diff options
author | Yaroslsav-95 <contact@yaroslavps.com> | 2018-01-31 08:27:11 +0300 |
---|---|---|
committer | Yaroslsav-95 <contact@yaroslavps.com> | 2018-01-31 08:27:11 +0300 |
commit | 28b67ad39af15d27bad7e55a0ae7fafe91139239 (patch) | |
tree | b94b7d55bfc8b95f2a3c0b96fe17d6eeee85589f /weblog/migrations/0002_auto_20180113_1606.py | |
parent | 40949b252c9929c755715d3e32df47cd82b095a0 (diff) | |
download | w3blog-28b67ad39af15d27bad7e55a0ae7fafe91139239.tar.gz w3blog-28b67ad39af15d27bad7e55a0ae7fafe91139239.zip |
Initial
Diffstat (limited to 'weblog/migrations/0002_auto_20180113_1606.py')
-rw-r--r-- | weblog/migrations/0002_auto_20180113_1606.py | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/weblog/migrations/0002_auto_20180113_1606.py b/weblog/migrations/0002_auto_20180113_1606.py new file mode 100644 index 0000000..8eb3789 --- /dev/null +++ b/weblog/migrations/0002_auto_20180113_1606.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.8 on 2018-01-13 13:06 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('weblog', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Category', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=250, verbose_name='Name')), + ('parent_category', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='weblog.Category', verbose_name='Parent category')), + ], + options={ + 'verbose_name': 'Category', + 'verbose_name_plural': 'Categories', + }, + ), + migrations.CreateModel( + name='CategoryTranslation', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=250, verbose_name='Name')), + ('language', models.CharField(max_length=5, verbose_name='Language (ISO)')), + ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='weblog.Category', verbose_name='Category')), + ], + options={ + 'verbose_name': 'Category name translation', + 'verbose_name_plural': 'Category name translations', + }, + ), + migrations.AddField( + model_name='blogpost', + name='published', + field=models.BooleanField(default=False, verbose_name='Published'), + preserve_default=False, + ), + migrations.AlterField( + model_name='blogpost', + name='original_language', + field=models.CharField(blank=True, max_length=5, verbose_name='Original language (ISO)'), + ), + migrations.AddField( + model_name='blogpost', + name='category', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='weblog.Category', verbose_name='Category'), + ), + ] |