Bläddra i källkod

removed migrations from git, fixed database stuff

rendu-univ
Phuntsok Drak-pa 1 år sedan
förälder
incheckning
5613802b2a
6 ändrade filer med 8 tillägg och 130 borttagningar
  1. +1
    -0
      .gitignore
  2. +7
    -2
      conlangdict/settings.py
  3. +0
    -67
      dictionary/migrations/0001_initial.py
  4. +0
    -38
      dictionary/migrations/0002_auto_20181224_1530.py
  5. +0
    -23
      dictionary/migrations/0003_auto_20181224_1538.py
  6. +0
    -0
      dictionary/migrations/__init__.py

+ 1
- 0
.gitignore Visa fil

@@ -92,3 +92,4 @@ db.sqlite3
secrets.py
static/*
logs/
*/migrations/*

+ 7
- 2
conlangdict/settings.py Visa fil

@@ -1,4 +1,4 @@
from .secrets import RELEASE_KEY, DEBUG
from .secrets import RELEASE_KEY, DEBUG, SECRET_DATABASES, RELEASE_PROD

"""
Django settings for conlangdict project.
@@ -22,7 +22,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/

SECRET_KEY = 'udbex%6hseo5tys7ovemjy&cu5x@r*qc9=2gqufh$md%#(ofx*'
if not DEBUG:
if RELEASE_PROD:
SECRET_KEY = RELEASE_KEY

ALLOWED_HOSTS = ['localhost', '127.0.0.1', 'phundrak.fr', 'langue.phundrak.fr', 'dict.langue.phundrak.fr',]
@@ -38,6 +38,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
]

MIDDLEWARE = [
@@ -80,6 +81,8 @@ DATABASES = {
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
if RELEASE_PROD:
DATABASES = SECRET_DATABASES


# Password validation
@@ -120,3 +123,5 @@ USE_TZ = True

STATIC_URL = '/static/'
STATIC_ROOT = "static"

SITE_ID = 1

+ 0
- 67
dictionary/migrations/0001_initial.py Visa fil

@@ -1,67 +0,0 @@
# Generated by Django 2.1.3 on 2018-12-05 11:53

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='Gender',
fields=[
('code', models.CharField(max_length=4, primary_key=True, serialize=False)),
('name', models.CharField(max_length=128)),
],
options={
'ordering': ('name',),
},
),
migrations.CreateModel(
name='Language',
fields=[
('code', models.CharField(max_length=4, primary_key=True, serialize=False)),
('name', models.CharField(max_length=128)),
],
options={
'ordering': ('code',),
},
),
migrations.CreateModel(
name='Word',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('word', models.CharField(max_length=128)),
('slug', models.CharField(max_length=128)),
('details', models.CharField(blank=True, max_length=8192)),
('etymology', models.CharField(blank=True, max_length=8192)),
('gender', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='dictionary.Gender')),
('language', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dictionary.Language')),
('roots', models.ManyToManyField(related_name='_word_roots_+', to='dictionary.Word')),
('translation', models.ManyToManyField(related_name='_word_translation_+', to='dictionary.Word')),
],
options={
'ordering': ('word',),
},
),
migrations.CreateModel(
name='Wordclass',
fields=[
('code', models.CharField(max_length=4, primary_key=True, serialize=False)),
('name', models.CharField(max_length=64)),
],
options={
'ordering': ('code',),
},
),
migrations.AddField(
model_name='word',
name='wordclass',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='dictionary.Wordclass'),
),
]

+ 0
- 38
dictionary/migrations/0002_auto_20181224_1530.py Visa fil

@@ -1,38 +0,0 @@
# Generated by Django 2.1.4 on 2018-12-24 15:30

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('dictionary', '0001_initial'),
]

operations = [
migrations.AddField(
model_name='language',
name='conlang',
field=models.BooleanField(default=True),
),
migrations.AlterField(
model_name='word',
name='details',
field=models.CharField(blank=True, max_length=8192, null=True),
),
migrations.AlterField(
model_name='word',
name='etymology',
field=models.CharField(blank=True, max_length=8192, null=True),
),
migrations.AlterField(
model_name='word',
name='roots',
field=models.ManyToManyField(null=True, related_name='_word_roots_+', to='dictionary.Word'),
),
migrations.AlterField(
model_name='word',
name='translation',
field=models.ManyToManyField(null=True, related_name='_word_translation_+', to='dictionary.Word'),
),
]

+ 0
- 23
dictionary/migrations/0003_auto_20181224_1538.py Visa fil

@@ -1,23 +0,0 @@
# Generated by Django 2.1.4 on 2018-12-24 15:38

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('dictionary', '0002_auto_20181224_1530'),
]

operations = [
migrations.AlterField(
model_name='word',
name='roots',
field=models.ManyToManyField(blank=True, related_name='_word_roots_+', to='dictionary.Word'),
),
migrations.AlterField(
model_name='word',
name='translation',
field=models.ManyToManyField(blank=True, related_name='_word_translation_+', to='dictionary.Word'),
),
]

+ 0
- 0
dictionary/migrations/__init__.py Visa fil