bgneal@996: # -*- coding: utf-8 -*- bgneal@996: from __future__ import unicode_literals bgneal@996: bgneal@996: from django.db import models, migrations bgneal@996: from django.conf import settings bgneal@996: import tagging.fields bgneal@996: bgneal@996: bgneal@996: class Migration(migrations.Migration): bgneal@996: bgneal@996: dependencies = [ bgneal@996: migrations.swappable_dependency(settings.AUTH_USER_MODEL), bgneal@996: ] bgneal@996: bgneal@996: operations = [ bgneal@996: migrations.CreateModel( bgneal@996: name='Category', bgneal@996: fields=[ bgneal@996: ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), bgneal@996: ('title', models.CharField(max_length=64)), bgneal@996: ('slug', models.SlugField(max_length=64)), bgneal@996: ('icon', models.ImageField(upload_to=b'news/categories/', blank=True)), bgneal@996: ], bgneal@996: options={ bgneal@996: 'ordering': ('title',), bgneal@996: 'verbose_name_plural': 'Categories', bgneal@996: }, bgneal@996: bases=(models.Model,), bgneal@996: ), bgneal@996: migrations.CreateModel( bgneal@996: name='PendingStory', bgneal@996: fields=[ bgneal@996: ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), bgneal@996: ('title', models.CharField(max_length=255)), bgneal@996: ('short_text', models.TextField()), bgneal@996: ('long_text', models.TextField(blank=True)), bgneal@996: ('date_submitted', models.DateTimeField(db_index=True)), bgneal@996: ('allow_comments', models.BooleanField(default=True)), bgneal@996: ('tags', tagging.fields.TagField(max_length=255, blank=True)), bgneal@996: ('front_page_expiration', models.DateField(null=True, blank=True)), bgneal@996: ('update_date', models.DateTimeField(db_index=True, blank=True)), bgneal@996: ('priority', models.IntegerField(default=0, db_index=True, blank=True)), bgneal@996: ('meta_description', models.TextField(blank=True)), bgneal@996: ('category', models.ForeignKey(to='news.Category')), bgneal@996: ('submitter', models.ForeignKey(to=settings.AUTH_USER_MODEL)), bgneal@996: ], bgneal@996: options={ bgneal@996: 'ordering': ('-date_submitted',), bgneal@996: 'verbose_name_plural': 'Pending Stories', bgneal@996: }, bgneal@996: bases=(models.Model,), bgneal@996: ), bgneal@996: migrations.CreateModel( bgneal@996: name='Story', bgneal@996: fields=[ bgneal@996: ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), bgneal@996: ('title', models.CharField(max_length=255)), bgneal@996: ('short_text', models.TextField()), bgneal@996: ('long_text', models.TextField(blank=True)), bgneal@996: ('date_submitted', models.DateTimeField(db_index=True)), bgneal@996: ('allow_comments', models.BooleanField(default=True)), bgneal@996: ('tags', tagging.fields.TagField(max_length=255, blank=True)), bgneal@996: ('front_page_expiration', models.DateField(null=True, blank=True)), bgneal@996: ('update_date', models.DateTimeField(db_index=True, blank=True)), bgneal@996: ('priority', models.IntegerField(default=0, db_index=True, blank=True)), bgneal@996: ('meta_description', models.TextField(blank=True)), bgneal@996: ('category', models.ForeignKey(to='news.Category')), bgneal@996: ('submitter', models.ForeignKey(to=settings.AUTH_USER_MODEL)), bgneal@996: ], bgneal@996: options={ bgneal@996: 'ordering': ('-date_submitted',), bgneal@996: 'verbose_name': 'news story', bgneal@996: 'verbose_name_plural': 'news stories', bgneal@996: }, bgneal@996: bases=(models.Model,), bgneal@996: ), bgneal@996: ]