comparison comments/migrations/0001_initial.py @ 1028:5ba2508939f7

Django 1.8 changes; first batch.
author Brian Neal <bgneal@gmail.com>
date Tue, 15 Dec 2015 21:01:07 -0600
parents
children
comparison
equal deleted inserted replaced
1027:cd4db27c90e3 1028:5ba2508939f7
1 # -*- coding: utf-8 -*-
2 from __future__ import unicode_literals
3
4 from django.db import migrations, models
5 from django.conf import settings
6
7
8 class Migration(migrations.Migration):
9
10 dependencies = [
11 ('contenttypes', '0002_remove_content_type_name'),
12 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
13 ]
14
15 operations = [
16 migrations.CreateModel(
17 name='Comment',
18 fields=[
19 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
20 ('object_id', models.PositiveIntegerField(db_index=True)),
21 ('comment', models.TextField(max_length=3000)),
22 ('html', models.TextField(blank=True)),
23 ('creation_date', models.DateTimeField()),
24 ('ip_address', models.IPAddressField(verbose_name=b'IP Address')),
25 ('is_public', models.BooleanField(default=True, help_text=b'Uncheck this field to make the comment invisible.')),
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')),
27 ('content_type', models.ForeignKey(to='contenttypes.ContentType')),
28 ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
29 ],
30 options={
31 'ordering': ('creation_date',),
32 },
33 ),
34 migrations.CreateModel(
35 name='CommentFlag',
36 fields=[
37 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
38 ('flag_date', models.DateTimeField(auto_now_add=True)),
39 ('comment', models.ForeignKey(to='comments.Comment')),
40 ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
41 ],
42 options={
43 'ordering': ('flag_date',),
44 },
45 ),
46 ]