1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-03-29 21:06
from __future__ import unicode_literals
from django.db import migrations, models
import src.models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Book',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=200)),
('image', models.FileField(blank=True, null=True, upload_to=src.models.get_upload_path)),
('slug', models.SlugField(unique_for_date='pub_date')),
('body_html', models.TextField(blank=True)),
('body_markdown', models.TextField()),
('pub_date', models.DateTimeField(verbose_name='Date published')),
('last_updated', models.DateTimeField(auto_now=True)),
('status', models.IntegerField(choices=[(0, 'Draft'), (1, 'Published')], default=0)),
('price', models.FloatField()),
('price_sale', models.FloatField()),
('meta_description', models.CharField(blank=True, max_length=256, null=True)),
('pages', models.DecimalField(blank=True, decimal_places=0, max_digits=3, null=True)),
('template_name', models.CharField(choices=[('details/src_book.html', 'Default'), ('details/src_book_2.html', 'Book Two')], default='details/src_book.html', max_length=200)),
],
options={
'get_latest_by': 'pub_date',
'ordering': ('-pub_date',),
},
),
migrations.CreateModel(
name='Entry',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=200)),
('slug', models.SlugField(unique_for_date='pub_date')),
('body_html', models.TextField(blank=True)),
('body_markdown', models.TextField()),
('pub_date', models.DateTimeField(verbose_name='Date published')),
('last_updated', models.DateTimeField(auto_now=True)),
('enable_comments', models.BooleanField(default=False)),
('has_code', models.BooleanField(default=False)),
('status', models.IntegerField(choices=[(0, 'Draft'), (1, 'Published')], default=0)),
('meta_description', models.CharField(blank=True, max_length=256, null=True)),
('template_name', models.IntegerField(choices=[(0, 'default')], default=0)),
],
options={
'get_latest_by': 'pub_date',
'ordering': ('-pub_date',),
'verbose_name_plural': 'entries',
},
),
migrations.CreateModel(
name='Topic',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=60)),
('slug', models.SlugField()),
('pluralized_name', models.CharField(max_length=60)),
],
),
migrations.AddField(
model_name='entry',
name='topics',
field=models.ManyToManyField(blank=True, to='src.Topic'),
),
]
|