annotate comments/migrations/0001_initial.py @ 1172:b957e4829a03

Add reCAPTCHA to contact form
author Brian Neal <bgneal@gmail.com>
date Sat, 14 Apr 2018 13:53:05 -0500
parents 5ba2508939f7
children
rev   line source
bgneal@1028 1 # -*- coding: utf-8 -*-
bgneal@1028 2 from __future__ import unicode_literals
bgneal@1028 3
bgneal@1028 4 from django.db import migrations, models
bgneal@1028 5 from django.conf import settings
bgneal@1028 6
bgneal@1028 7
bgneal@1028 8 class Migration(migrations.Migration):
bgneal@1028 9
bgneal@1028 10 dependencies = [
bgneal@1028 11 ('contenttypes', '0002_remove_content_type_name'),
bgneal@1028 12 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
bgneal@1028 13 ]
bgneal@1028 14
bgneal@1028 15 operations = [
bgneal@1028 16 migrations.CreateModel(
bgneal@1028 17 name='Comment',
bgneal@1028 18 fields=[
bgneal@1028 19 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
bgneal@1028 20 ('object_id', models.PositiveIntegerField(db_index=True)),
bgneal@1028 21 ('comment', models.TextField(max_length=3000)),
bgneal@1028 22 ('html', models.TextField(blank=True)),
bgneal@1028 23 ('creation_date', models.DateTimeField()),
bgneal@1028 24 ('ip_address', models.IPAddressField(verbose_name=b'IP Address')),
bgneal@1028 25 ('is_public', models.BooleanField(default=True, help_text=b'Uncheck this field to make the comment invisible.')),
bgneal@1028 26 ('is_removed', models.BooleanField(default=False, help_text=b'Check this field to replace the comment with a "This comment has been removed" message')),
bgneal@1028 27 ('content_type', models.ForeignKey(to='contenttypes.ContentType')),
bgneal@1028 28 ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
bgneal@1028 29 ],
bgneal@1028 30 options={
bgneal@1028 31 'ordering': ('creation_date',),
bgneal@1028 32 },
bgneal@1028 33 ),
bgneal@1028 34 migrations.CreateModel(
bgneal@1028 35 name='CommentFlag',
bgneal@1028 36 fields=[
bgneal@1028 37 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
bgneal@1028 38 ('flag_date', models.DateTimeField(auto_now_add=True)),
bgneal@1028 39 ('comment', models.ForeignKey(to='comments.Comment')),
bgneal@1028 40 ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
bgneal@1028 41 ],
bgneal@1028 42 options={
bgneal@1028 43 'ordering': ('flag_date',),
bgneal@1028 44 },
bgneal@1028 45 ),
bgneal@1028 46 ]