示例#1
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('forums', '0007_auto_20200724_1917'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('content', models.TextField(max_length=400)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('forum',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='forums.ForumPost')),
                ('user',
                 models.ForeignKey(on_delete=models.SET(
                     comments.models.get_sentinel_user),
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-updated', '-timestamp'],
            },
        ),
    ]
示例#2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('threads', '0006_auto_20190316_1121'),
    ]

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('content', models.TextField(max_length=1024)),
                ('author',
                 models.ForeignKey(on_delete=models.SET(
                     comments.models.get_null_user),
                                   related_name='comments',
                                   to=settings.AUTH_USER_MODEL)),
                ('thread',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='comments',
                                   to='threads.Post')),
            ],
            options={
                'ordering': ['-created'],
            },
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('post', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('content', models.TextField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('author',
                 models.ForeignKey(on_delete=models.SET(
                     comments.models.get_sentinel_user),
                                   to=settings.AUTH_USER_MODEL)),
                ('post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='comments',
                                   to='post.Post')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('comments', '0011_auto_20171007_0016'),
    ]

    operations = [
        migrations.AlterField(
            model_name='commentpost',
            name='img',
            field=models.ImageField(
                blank=True,
                default='/img/comments/vector-smart-object.png',
                upload_to='img',
                validators=[comments.models.validate_file_extension],
                verbose_name='Фото'),
        ),
        migrations.AlterField(
            model_name='commentpost',
            name='pub_date',
            field=models.DateTimeField(default=datetime.datetime(
                2017, 10, 8, 15, 56, 29, 125837),
                                       verbose_name='Дата комментария'),
        ),
    ]
示例#5
0
class Migration(migrations.Migration):

    dependencies = [
        ('comments', '0003_deletecomment'),
    ]

    operations = [
        migrations.CreateModel(
            name='ReportComment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('reporter', models.CharField(max_length=115)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('reason',
                 models.CharField(max_length=415,
                                  validators=[comments.models.validate_reason
                                              ])),
                ('done', models.BooleanField()),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('comments', '0010_auto_20171006_2358'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='commentpost',
            name='file',
        ),
        migrations.AlterField(
            model_name='commentpost',
            name='img',
            field=models.ImageField(
                blank=True,
                default='/img/intro_vOaT9r2.jpg',
                upload_to='img',
                validators=[comments.models.validate_file_extension],
                verbose_name='Фото'),
        ),
        migrations.AlterField(
            model_name='commentpost',
            name='pub_date',
            field=models.DateTimeField(default=datetime.datetime(
                2017, 10, 7, 0, 16, 13, 868434),
                                       verbose_name='Дата комментария'),
        ),
    ]
示例#7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('recipes', '0003_auto_20200224_0508'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, verbose_name='id')),
                ('text', models.TextField(verbose_name='Comment')),
                ('html', models.TextField(verbose_name='Comment HTML')),
                ('nesting', models.PositiveSmallIntegerField(default=0, verbose_name='Nesting')),
                ('deleted', models.BooleanField(default=False, verbose_name='Deleted')),
                ('timestamp', models.DateTimeField(default=comments.models.utc_now, verbose_name='Timestamp')),
                ('last_edited', models.DateTimeField(default=datetime.datetime(1970, 1, 1, 0, 0, tzinfo=utc), verbose_name='Last Edited')),
                ('spam', models.BooleanField(default=False, verbose_name='Marked Spam')),
                ('flag_count', models.IntegerField(default=0, verbose_name='Flag Count')),
                ('parent', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='comments.Comment')),
                ('recipe', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='recipes.Recipe')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-timestamp'],
            },
        ),
        migrations.CreateModel(
            name='Flag',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, verbose_name='id')),
                ('timestamp', models.DateTimeField(default=comments.models.utc_now, verbose_name='timestamp')),
                ('comment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='comments.Comment')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-timestamp'],
            },
        ),
        migrations.AddConstraint(
            model_name='flag',
            constraint=models.UniqueConstraint(fields=('comment', 'user'), name='unique_comment_flag'),
        ),
    ]
示例#8
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user', models.CharField(max_length=115)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('content', models.CharField(max_length=1800, validators=[comments.models.validate_content])),
                ('likes', models.IntegerField(default=0)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('comments', '0009_auto_20171006_2353'),
    ]

    operations = [
        migrations.AlterField(
            model_name='commentpost',
            name='file',
            field=models.FileField(
                upload_to='img',
                validators=[comments.models.validate_file_extension]),
        ),
        migrations.AlterField(
            model_name='commentpost',
            name='pub_date',
            field=models.DateTimeField(default=datetime.datetime(
                2017, 10, 6, 23, 58, 51, 168109),
                                       verbose_name='Дата комментария'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('comments', '0008_auto_20171004_2355'),
    ]

    operations = [
        migrations.AddField(
            model_name='commentpost',
            name='file',
            field=models.FileField(
                default=0,
                upload_to='documents/%Y/%m/%d',
                validators=[comments.models.validate_file_extension]),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='commentpost',
            name='pub_date',
            field=models.DateTimeField(default=datetime.datetime(
                2017, 10, 6, 23, 53, 35, 129157),
                                       verbose_name='Дата комментария'),
        ),
    ]
示例#11
0
class Migration(migrations.Migration):

    dependencies = [
        ('comments', '0008_auto_20200711_1700'),
    ]

    operations = [
        migrations.CreateModel(
            name='DeleteReply',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('deleted_by', models.CharField(max_length=115)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('reason',
                 models.CharField(max_length=415,
                                  validators=[comments.models.validate_reason
                                              ])),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('grant_management', '0048_installment_helptext'),
        ('comments', '0030_auto_20200520_1245'),
    ]

    operations = [
        migrations.CreateModel(
            name='GrantAgreementCommentCategory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_on',
                 models.DateTimeField(
                     auto_now_add=True,
                     help_text='Date and time at which the entry was created')
                 ),
                ('modified_on',
                 models.DateTimeField(
                     auto_now=True,
                     help_text='Date and time at which the entry was modified',
                     null=True)),
                ('category',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.PROTECT,
                     to='comments.Category')),
            ],
            options={
                'verbose_name_plural': 'GrantAgreement Comment Categories',
            },
        ),
        migrations.CreateModel(
            name='GrantAgreementAttachmentCategory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_on',
                 models.DateTimeField(
                     auto_now_add=True,
                     help_text='Date and time at which the entry was created')
                 ),
                ('modified_on',
                 models.DateTimeField(
                     auto_now=True,
                     help_text='Date and time at which the entry was modified',
                     null=True)),
                ('category',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.PROTECT,
                     to='comments.Category')),
            ],
            options={
                'verbose_name_plural': 'Grant Agreement Attachment Categories',
            },
        ),
        migrations.CreateModel(
            name='GrantAgreementComment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_on',
                 models.DateTimeField(
                     auto_now_add=True,
                     help_text='Date and time at which the entry was created')
                 ),
                ('modified_on',
                 models.DateTimeField(
                     auto_now=True,
                     help_text='Date and time at which the entry was modified',
                     null=True)),
                ('text', models.TextField(help_text='Comment text')),
                ('category',
                 models.ForeignKey(
                     help_text='Type of comment',
                     on_delete=django.db.models.deletion.PROTECT,
                     to='comments.GrantAgreementCommentCategory')),
                ('created_by',
                 models.ForeignKey(
                     blank=True,
                     help_text='User by which the entry was created',
                     null=True,
                     on_delete=django.db.models.deletion.PROTECT,
                     related_name=
                     'comments_grantagreementcomment_created_by_related',
                     to=settings.AUTH_USER_MODEL)),
                ('grant_agreement',
                 models.ForeignKey(
                     help_text=
                     'GrantAgreement about which the comment was made',
                     on_delete=django.db.models.deletion.PROTECT,
                     to='grant_management.GrantAgreement')),
            ],
            options={
                'unique_together':
                {('grant_agreement', 'created_on', 'created_by')},
            },
        ),
        migrations.CreateModel(
            name='GrantAgreementAttachment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_on',
                 models.DateTimeField(
                     auto_now_add=True,
                     help_text='Date and time at which the entry was created')
                 ),
                ('modified_on',
                 models.DateTimeField(
                     auto_now=True,
                     help_text='Date and time at which the entry was modified',
                     null=True)),
                ('text',
                 models.TextField(blank=True,
                                  help_text='Comment of the attachment',
                                  null=True)),
                ('file',
                 models.FileField(
                     storage=storages.backends.s3boto3.S3Boto3Storage(),
                     upload_to=comments.models.
                     grant_agreement_attachment_rename)),
                ('category',
                 models.ForeignKey(
                     help_text='Category of the attachment',
                     on_delete=django.db.models.deletion.PROTECT,
                     to='comments.GrantAgreementAttachmentCategory')),
                ('created_by',
                 models.ForeignKey(
                     blank=True,
                     help_text='User by which the entry was created',
                     null=True,
                     on_delete=django.db.models.deletion.PROTECT,
                     related_name=
                     'comments_grantagreementattachment_created_by_related',
                     to=settings.AUTH_USER_MODEL)),
                ('grant_agreement',
                 models.ForeignKey(
                     help_text='GrantAgreement that this attachment belongs to',
                     on_delete=django.db.models.deletion.PROTECT,
                     to='grant_management.GrantAgreement')),
            ],
            options={
                'abstract': False,
                'unique_together': {('created_on', 'created_by')},
            },
        ),
    ]
示例#13
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='post',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(blank=True, upload_to='photos/%Y/%m/%d')),
                ('content',
                 models.CharField(
                     blank=True,
                     max_length=140,
                     validators=[comments.validation.validate_content])),
                ('updated',
                 models.DateTimeField(blank=True,
                                      default=datetime.datetime.now)),
                ('timestamp',
                 models.DateTimeField(blank=True,
                                      default=datetime.datetime.now)),
                ('comments',
                 djongo.models.fields.ArrayModelField(
                     blank=True,
                     model_container=comments.models.comment,
                     null=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment_id',
                 models.IntegerField(default=comments.models.comment.ids,
                                     unique=True)),
                ('messages', models.CharField(blank=True, max_length=140)),
                ('time', models.DateTimeField(auto_now=True)),
                ('no_of_like', models.IntegerField(blank=True)),
                ('likes',
                 djongo.models.fields.ArrayModelField(
                     blank=True,
                     model_container=comments.models.like,
                     null=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]