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