diff options
Diffstat (limited to 'news/migrations/0001_initial.py')
-rw-r--r-- | news/migrations/0001_initial.py | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/news/migrations/0001_initial.py b/news/migrations/0001_initial.py index e30bf5c9..fc6b6cfb 100644 --- a/news/migrations/0001_initial.py +++ b/news/migrations/0001_initial.py @@ -1,21 +1,37 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +# -*- coding: utf-8 -*- +from __future__ import unicode_literals -class Migration(SchemaMigration): +from django.db import models, migrations +import django.db.models.deletion +from django.conf import settings - def forwards(self, orm): - pass +class Migration(migrations.Migration): - def backwards(self, orm): - pass + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] - - models = { - - } - - complete_apps = ['news'] + operations = [ + migrations.CreateModel( + name='News', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('slug', models.SlugField(unique=True, max_length=255)), + ('postdate', models.DateTimeField(verbose_name=b'post date', db_index=True)), + ('last_modified', models.DateTimeField(editable=False, db_index=True)), + ('title', models.CharField(max_length=255)), + ('guid', models.CharField(max_length=255, editable=False)), + ('content', models.TextField()), + ('safe_mode', models.BooleanField(default=True)), + ('author', models.ForeignKey(related_name=b'news_author', on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)), + ], + options={ + 'ordering': ('-postdate',), + 'db_table': 'news', + 'verbose_name_plural': 'news', + 'get_latest_by': 'postdate', + }, + bases=(models.Model,), + ), + ] |