]> gitweb.fperrin.net Git - djsite.git/blob - quotes/migrations/0001_initial.py
Use django-tagging for tags
[djsite.git] / quotes / migrations / 0001_initial.py
1 # -*- coding: utf-8 -*-
2 # Generated by Django 1.10.2 on 2016-10-31 00:22
3 from __future__ import unicode_literals
4
5 from django.db import migrations, models
6 import django.db.models.deletion
7 import quotes.localmodels
8
9
10 class Migration(migrations.Migration):
11
12     initial = True
13
14     dependencies = [
15     ]
16
17     operations = [
18         migrations.CreateModel(
19             name='Author',
20             fields=[
21                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
22                 ('name', models.CharField(help_text=b'Name of the author', max_length=100)),
23                 ('notes', quotes.localmodels.HTMLField(blank=True, help_text=b'Notes about the author; may be left blank. Will                       not be HTML-escaped.')),
24                 ('pvt_notes', quotes.localmodels.HTMLField(blank=True, help_text=b'Notes about the author; not displayed on                           the public interface')),
25                 ('birth_date', models.DateField(blank=True, help_text=b'Date of birth', null=True)),
26                 ('death_date', models.DateField(blank=True, help_text=b'Date of death (leave blank                                   if still alive!)', null=True)),
27             ],
28         ),
29         migrations.CreateModel(
30             name='Quote',
31             fields=[
32                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
33                 ('text', quotes.localmodels.HTMLField()),
34                 ('notes', quotes.localmodels.HTMLField(blank=True, help_text=b'Notes about the quote; may be left blank. Will                       not be HTML-escaped. XXX: offer a WYSIWYG editor')),
35                 ('pvt_notes', quotes.localmodels.HTMLField(blank=True, help_text=b'Notes about the quote; not displayed on                           the public interface')),
36             ],
37         ),
38         migrations.CreateModel(
39             name='Tag',
40             fields=[
41                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
42                 ('tag', models.CharField(max_length=100)),
43             ],
44         ),
45         migrations.CreateModel(
46             name='Work',
47             fields=[
48                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
49                 ('name', models.CharField(help_text=b'Name of the context for the quote                             (title of the work or speech it appears in)', max_length=100)),
50                 ('date', models.DateField(blank=True, help_text=b'Date of the quote', null=True)),
51                 ('notes', quotes.localmodels.HTMLField(blank=True, help_text=b'Notes about the work; may be left blank. Will                       not be HTML-escaped. XXX: offer a WYSIWYG editor')),
52                 ('pvt_notes', quotes.localmodels.HTMLField(blank=True, help_text=b'Notes about the work; not displayed on                           the public interface')),
53                 ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='quotes.Author')),
54                 ('tags', models.ManyToManyField(blank=True, to='quotes.Tag')),
55             ],
56         ),
57         migrations.AddField(
58             model_name='quote',
59             name='tags',
60             field=models.ManyToManyField(blank=True, to='quotes.Tag'),
61         ),
62         migrations.AddField(
63             model_name='quote',
64             name='work',
65             field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='quotes.Work'),
66         ),
67         migrations.AddField(
68             model_name='author',
69             name='tags',
70             field=models.ManyToManyField(blank=True, to='quotes.Tag'),
71         ),
72     ]