]> gitweb.fperrin.net Git - djsite.git/blobdiff - quotes/migrations/0003_auto_20161009_2254.py
Add a 'work' concept
[djsite.git] / quotes / migrations / 0003_auto_20161009_2254.py
diff --git a/quotes/migrations/0003_auto_20161009_2254.py b/quotes/migrations/0003_auto_20161009_2254.py
new file mode 100644 (file)
index 0000000..b3b0366
--- /dev/null
@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('quotes', '0002_context_author'),
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='Work',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('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)),
+                ('date', models.DateField(help_text=b'Date of the quote', null=True, blank=True)),
+                ('notes', models.TextField(help_text=b'Notes about the work; may be left blank. Will                               not be HTML-escaped. XXX: offer a WYSIWYG editor', blank=True)),
+                ('pvt_notes', models.TextField(help_text=b'Notes about the work; not displayed on                                   the public interface', blank=True)),
+                ('author', models.ForeignKey(to='quotes.Author')),
+                ('tags', models.ManyToManyField(to='quotes.Tag', blank=True)),
+            ],
+        ),
+        migrations.RemoveField(
+            model_name='context',
+            name='author',
+        ),
+        migrations.RemoveField(
+            model_name='context',
+            name='tags',
+        ),
+        migrations.AlterField(
+            model_name='quote',
+            name='context',
+            field=models.ForeignKey(to='quotes.Work'),
+        ),
+        migrations.DeleteModel(
+            name='Context',
+        ),
+    ]