removed migrations from git, fixed database stuff

parent 055a685a
Pipeline #135 canceled with stage
......@@ -92,3 +92,4 @@ db.sqlite3
secrets.py
static/*
logs/
*/migrations/*
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
# 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'),
),
]
# 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'),
),
]
# 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'),
),
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment