Mercurial > public > sg101
comparison comments/migrations/0001_initial.py @ 1206:02181fa5ac9d modernize tip
Update to Django 1.9.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 22 Jan 2025 17:58:16 -0600 |
parents | 5ba2508939f7 |
children |
comparison
equal
deleted
inserted
replaced
1205:510ef3cbf3e6 | 1206:02181fa5ac9d |
---|---|
22 ('html', models.TextField(blank=True)), | 22 ('html', models.TextField(blank=True)), |
23 ('creation_date', models.DateTimeField()), | 23 ('creation_date', models.DateTimeField()), |
24 ('ip_address', models.IPAddressField(verbose_name=b'IP Address')), | 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.')), | 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')), | 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')), | 27 ('content_type', models.ForeignKey(to='contenttypes.ContentType', on_delete=models.CASCADE)), |
28 ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), | 28 ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)), |
29 ], | 29 ], |
30 options={ | 30 options={ |
31 'ordering': ('creation_date',), | 31 'ordering': ('creation_date',), |
32 }, | 32 }, |
33 ), | 33 ), |
34 migrations.CreateModel( | 34 migrations.CreateModel( |
35 name='CommentFlag', | 35 name='CommentFlag', |
36 fields=[ | 36 fields=[ |
37 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | 37 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), |
38 ('flag_date', models.DateTimeField(auto_now_add=True)), | 38 ('flag_date', models.DateTimeField(auto_now_add=True)), |
39 ('comment', models.ForeignKey(to='comments.Comment')), | 39 ('comment', models.ForeignKey(to='comments.Comment', |
40 ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), | 40 on_delete=models.CASCADE)), |
41 ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL, | |
42 on_delete=models.CASCADE)), | |
41 ], | 43 ], |
42 options={ | 44 options={ |
43 'ordering': ('flag_date',), | 45 'ordering': ('flag_date',), |
44 }, | 46 }, |
45 ), | 47 ), |