annotate news/migrations/0001_initial.py @ 996:ec28e9d1e82a

Initial makemigrations for news.
author Brian Neal <bgneal@gmail.com>
date Sun, 15 Nov 2015 20:44:27 -0600
parents
children
rev   line source
bgneal@996 1 # -*- coding: utf-8 -*-
bgneal@996 2 from __future__ import unicode_literals
bgneal@996 3
bgneal@996 4 from django.db import models, migrations
bgneal@996 5 from django.conf import settings
bgneal@996 6 import tagging.fields
bgneal@996 7
bgneal@996 8
bgneal@996 9 class Migration(migrations.Migration):
bgneal@996 10
bgneal@996 11 dependencies = [
bgneal@996 12 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
bgneal@996 13 ]
bgneal@996 14
bgneal@996 15 operations = [
bgneal@996 16 migrations.CreateModel(
bgneal@996 17 name='Category',
bgneal@996 18 fields=[
bgneal@996 19 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
bgneal@996 20 ('title', models.CharField(max_length=64)),
bgneal@996 21 ('slug', models.SlugField(max_length=64)),
bgneal@996 22 ('icon', models.ImageField(upload_to=b'news/categories/', blank=True)),
bgneal@996 23 ],
bgneal@996 24 options={
bgneal@996 25 'ordering': ('title',),
bgneal@996 26 'verbose_name_plural': 'Categories',
bgneal@996 27 },
bgneal@996 28 bases=(models.Model,),
bgneal@996 29 ),
bgneal@996 30 migrations.CreateModel(
bgneal@996 31 name='PendingStory',
bgneal@996 32 fields=[
bgneal@996 33 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
bgneal@996 34 ('title', models.CharField(max_length=255)),
bgneal@996 35 ('short_text', models.TextField()),
bgneal@996 36 ('long_text', models.TextField(blank=True)),
bgneal@996 37 ('date_submitted', models.DateTimeField(db_index=True)),
bgneal@996 38 ('allow_comments', models.BooleanField(default=True)),
bgneal@996 39 ('tags', tagging.fields.TagField(max_length=255, blank=True)),
bgneal@996 40 ('front_page_expiration', models.DateField(null=True, blank=True)),
bgneal@996 41 ('update_date', models.DateTimeField(db_index=True, blank=True)),
bgneal@996 42 ('priority', models.IntegerField(default=0, db_index=True, blank=True)),
bgneal@996 43 ('meta_description', models.TextField(blank=True)),
bgneal@996 44 ('category', models.ForeignKey(to='news.Category')),
bgneal@996 45 ('submitter', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
bgneal@996 46 ],
bgneal@996 47 options={
bgneal@996 48 'ordering': ('-date_submitted',),
bgneal@996 49 'verbose_name_plural': 'Pending Stories',
bgneal@996 50 },
bgneal@996 51 bases=(models.Model,),
bgneal@996 52 ),
bgneal@996 53 migrations.CreateModel(
bgneal@996 54 name='Story',
bgneal@996 55 fields=[
bgneal@996 56 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
bgneal@996 57 ('title', models.CharField(max_length=255)),
bgneal@996 58 ('short_text', models.TextField()),
bgneal@996 59 ('long_text', models.TextField(blank=True)),
bgneal@996 60 ('date_submitted', models.DateTimeField(db_index=True)),
bgneal@996 61 ('allow_comments', models.BooleanField(default=True)),
bgneal@996 62 ('tags', tagging.fields.TagField(max_length=255, blank=True)),
bgneal@996 63 ('front_page_expiration', models.DateField(null=True, blank=True)),
bgneal@996 64 ('update_date', models.DateTimeField(db_index=True, blank=True)),
bgneal@996 65 ('priority', models.IntegerField(default=0, db_index=True, blank=True)),
bgneal@996 66 ('meta_description', models.TextField(blank=True)),
bgneal@996 67 ('category', models.ForeignKey(to='news.Category')),
bgneal@996 68 ('submitter', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
bgneal@996 69 ],
bgneal@996 70 options={
bgneal@996 71 'ordering': ('-date_submitted',),
bgneal@996 72 'verbose_name': 'news story',
bgneal@996 73 'verbose_name_plural': 'news stories',
bgneal@996 74 },
bgneal@996 75 bases=(models.Model,),
bgneal@996 76 ),
bgneal@996 77 ]