X-Git-Url: http://gitweb.fperrin.net/?p=djsite.git;a=blobdiff_plain;f=quotes%2Fmigrations%2F0001_initial.py;h=c7f97c4a58b7a20b0ae950315b5a987e161ac993;hp=927cce952bf1bbc33259c6d499cb9e36288cfeff;hb=1beb1e7de4e076707eedf1be7386b238f19aeb60;hpb=5c563ff1701456a2ca7108a301e4e48457475daa diff --git a/quotes/migrations/0001_initial.py b/quotes/migrations/0001_initial.py index 927cce9..c7f97c4 100644 --- a/quotes/migrations/0001_initial.py +++ b/quotes/migrations/0001_initial.py @@ -1,16 +1,11 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.10.2 on 2016-10-31 00:22 from __future__ import unicode_literals from django.db import migrations, models -import django.db.models.deletion -import quotes.localmodels class Migration(migrations.Migration): - initial = True - dependencies = [ ] @@ -18,55 +13,54 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Author', fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('name', models.CharField(help_text=b'Name of the author', max_length=100)), - ('notes', quotes.localmodels.HTMLField(blank=True, help_text=b'Notes about the author; may be left blank. Will not be HTML-escaped.')), - ('pvt_notes', quotes.localmodels.HTMLField(blank=True, help_text=b'Notes about the author; not displayed on the public interface')), - ('birth_date', models.DateField(blank=True, help_text=b'Date of birth', null=True)), - ('death_date', models.DateField(blank=True, help_text=b'Date of death (leave blank if still alive!)', null=True)), + ('notes', models.TextField(help_text=b'Notes about the author; may be left blank. Will not be HTML-escaped.', blank=True)), + ('pvt_notes', models.TextField(help_text=b'Notes about the author; not displayed on the public interface', blank=True)), + ('birth_date', models.DateField(help_text=b'Date of birth', null=True, blank=True)), + ('death_date', models.DateField(help_text=b'Date of death (leave blank if still alive!)', null=True, blank=True)), ], ), migrations.CreateModel( - name='Quote', + name='Context', fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('text', quotes.localmodels.HTMLField()), - ('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')), - ('pvt_notes', quotes.localmodels.HTMLField(blank=True, help_text=b'Notes about the quote; not displayed on the public interface')), + ('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)), ], ), migrations.CreateModel( - name='Tag', + name='Quote', fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('tag', models.CharField(max_length=100)), + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('text', models.TextField()), + ('notes', models.TextField(help_text=b'Notes about the quote; 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 quote; not displayed on the public interface', blank=True)), + ('context', models.ForeignKey(to='quotes.Context')), ], ), migrations.CreateModel( - name='Work', + name='Tag', fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('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(blank=True, help_text=b'Date of the quote', null=True)), - ('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')), - ('pvt_notes', quotes.localmodels.HTMLField(blank=True, help_text=b'Notes about the work; not displayed on the public interface')), - ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='quotes.Author')), - ('tags', models.ManyToManyField(blank=True, to='quotes.Tag')), + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('tag', models.CharField(max_length=100)), ], ), migrations.AddField( model_name='quote', name='tags', - field=models.ManyToManyField(blank=True, to='quotes.Tag'), + field=models.ManyToManyField(to='quotes.Tag', blank=True), ), migrations.AddField( - model_name='quote', - name='work', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='quotes.Work'), + model_name='context', + name='tags', + field=models.ManyToManyField(to='quotes.Tag', blank=True), ), migrations.AddField( model_name='author', name='tags', - field=models.ManyToManyField(blank=True, to='quotes.Tag'), + field=models.ManyToManyField(to='quotes.Tag', blank=True), ), ]