Fix bug with pagination usage.
[django-migdal.git] / migdal / migrations / 0001_initial.py
1 # -*- coding: utf-8 -*-
2 # Generated by Django 1.10.6 on 2017-03-29 09:51
3 from __future__ import unicode_literals
4
5 from django.db import migrations, models
6 import django.db.models.deletion
7 import markupfield.fields
8 import migdal.fields
9
10
11 class Migration(migrations.Migration):
12
13     initial = True
14
15     dependencies = [
16     ]
17
18     operations = [
19         migrations.CreateModel(
20             name='Attachment',
21             fields=[
22                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
23                 ('file', models.FileField(upload_to=b'entry/attach/', verbose_name='file')),
24             ],
25         ),
26         migrations.CreateModel(
27             name='Category',
28             fields=[
29                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
30                 ('taxonomy', models.CharField(choices=[(b'topics', 'topics'), (b'types', 'types')], max_length=32, verbose_name='taxonomy')),
31                 ('title_pl', models.CharField(db_index=True, max_length=64, unique=True)),
32                 ('title_en', models.CharField(db_index=True, max_length=64, unique=True)),
33                 ('slug_pl', models.SlugField(unique=True)),
34                 ('slug_en', models.SlugField(unique=True)),
35             ],
36             options={
37                 'verbose_name': 'category',
38                 'verbose_name_plural': 'categories',
39             },
40         ),
41         migrations.CreateModel(
42             name='Entry',
43             fields=[
44                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
45                 ('type', models.CharField(choices=[(b'news', 'news'), (b'publications', 'publications'), (b'info', 'info')], db_index=True, max_length=16)),
46                 ('date', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='created at')),
47                 ('changed_at', models.DateTimeField(auto_now=True, db_index=True, verbose_name='changed at')),
48                 ('author', models.CharField(max_length=128, verbose_name='author')),
49                 ('author_email', models.EmailField(blank=True, help_text='Used only to display gravatar and send notifications.', max_length=128, null=True, verbose_name='author email')),
50                 ('image', models.ImageField(blank=True, null=True, upload_to=b'entry/image/', verbose_name='image')),
51                 ('promo', models.BooleanField(default=False, verbose_name='promoted')),
52                 ('in_stream', models.BooleanField(default=True, verbose_name='in stream')),
53                 ('first_published_at', models.DateTimeField(blank=True, null=True, verbose_name='published at')),
54                 ('canonical_url', models.URLField(blank=True, null=True, verbose_name='canonical link')),
55                 ('needed_en', models.CharField(choices=[(b'n', 'Unneeded'), (b'w', 'Needed'), (b'y', 'Done')], db_index=True, default=b'n', max_length=1, verbose_name='needed')),
56                 ('slug_pl', migdal.fields.SlugNullField(blank=True, null=True, unique=True)),
57                 ('slug_en', migdal.fields.SlugNullField(blank=True, null=True, unique=True)),
58                 ('title_pl', models.CharField(blank=True, max_length=255, null=True, verbose_name='title')),
59                 ('title_en', models.CharField(blank=True, max_length=255, null=True, verbose_name='title')),
60                 ('lead_pl', markupfield.fields.MarkupField(blank=True, help_text='Use <a href="http://textile.thresholdstate.com/">Textile</a> syntax.', null=True, rendered_field=True, verbose_name='lead')),
61                 ('lead_en', markupfield.fields.MarkupField(blank=True, help_text='Use <a href="http://textile.thresholdstate.com/">Textile</a> syntax.', null=True, rendered_field=True, verbose_name='lead')),
62                 ('body_pl', markupfield.fields.MarkupField(blank=True, help_text='Use <a href="http://textile.thresholdstate.com/">Textile</a> syntax.', null=True, rendered_field=True, verbose_name='body')),
63                 ('body_en', markupfield.fields.MarkupField(blank=True, help_text='Use <a href="http://textile.thresholdstate.com/">Textile</a> syntax.', null=True, rendered_field=True, verbose_name='body')),
64                 ('lead_pl_markup_type', models.CharField(choices=[(b'', b'--'), (b'textile_pl', b'textile_pl')], default=b'textile_pl', editable=False, max_length=30)),
65                 ('lead_en_markup_type', models.CharField(choices=[(b'', b'--'), (b'textile_pl', b'textile_pl')], default=b'textile_pl', editable=False, max_length=30)),
66                 ('body_pl_markup_type', models.CharField(choices=[(b'', b'--'), (b'textile_pl', b'textile_pl')], default=b'textile_pl', editable=False, max_length=30)),
67                 ('body_en_markup_type', models.CharField(choices=[(b'', b'--'), (b'textile_pl', b'textile_pl')], default=b'textile_pl', editable=False, max_length=30)),
68                 ('_lead_pl_rendered', models.TextField(editable=False, null=True)),
69                 ('_lead_en_rendered', models.TextField(editable=False, null=True)),
70                 ('published_pl', models.BooleanField(default=False, verbose_name='published')),
71                 ('published_en', models.BooleanField(default=False, verbose_name='published')),
72                 ('_body_pl_rendered', models.TextField(editable=False, null=True)),
73                 ('_body_en_rendered', models.TextField(editable=False, null=True)),
74                 ('published_at_pl', models.DateTimeField(blank=True, null=True, verbose_name='published at')),
75                 ('published_at_en', models.DateTimeField(blank=True, null=True, verbose_name='published at')),
76                 ('categories', models.ManyToManyField(blank=True, to='migdal.Category', verbose_name='categories')),
77             ],
78             options={
79                 'ordering': ['-date'],
80                 'verbose_name': 'entry',
81                 'verbose_name_plural': 'entries',
82             },
83         ),
84         migrations.AddField(
85             model_name='attachment',
86             name='entry',
87             field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='migdal.Entry'),
88         ),
89         migrations.CreateModel(
90             name='Entry_info',
91             fields=[
92             ],
93             options={
94                 'verbose_name': 'entry: info',
95                 'proxy': True,
96                 'verbose_name_plural': 'entries: info',
97             },
98             bases=('migdal.entry',),
99         ),
100         migrations.CreateModel(
101             name='Entry_news',
102             fields=[
103             ],
104             options={
105                 'verbose_name': 'entry: news',
106                 'proxy': True,
107                 'verbose_name_plural': 'entries: news',
108             },
109             bases=('migdal.entry',),
110         ),
111         migrations.CreateModel(
112             name='Entry_publications',
113             fields=[
114             ],
115             options={
116                 'verbose_name': 'entry: publications',
117                 'proxy': True,
118                 'verbose_name_plural': 'entries: publications',
119             },
120             bases=('migdal.entry',),
121         ),
122     ]