class Migration(migrations.Migration):

    dependencies = [
        ("board", "0008_movement_player"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="movement",
            options={"ordering": ("created", )},
        ),
        migrations.AlterField(
            model_name="game",
            name="code",
            field=models.CharField(
                choices=[
                    ("R", "RED"),
                    ("G", "GREEN"),
                    ("B", "BLUE"),
                    ("O", "ORANGE"),
                    ("P", "PURPLE"),
                    ("Y", "YELLOW"),
                ],
                default=board.models.create_code,
                max_length=64,
            ),
        ),
        migrations.AlterField(
            model_name="movement",
            name="code",
            field=models.CharField(blank=True, max_length=64),
        ),
    ]
Example #2
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='CoinAccount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('address', models.CharField(max_length=100)),
                ('deposit', models.IntegerField(default=0)),
                ('owner', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='coinaccount', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('author', models.CharField(max_length=50)),
                ('text', models.TextField()),
                ('created_date', models.DateTimeField(default=django.utils.timezone.localtime)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('text', models.TextField()),
                ('audio_file', models.FileField(blank=True, upload_to=board.models.upload_audio)),
                ('like', models.IntegerField(default=0)),
                ('created_date', models.DateTimeField(default=django.utils.timezone.localtime)),
                ('published_date', models.DateTimeField(blank=True, null=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='posts', to=settings.AUTH_USER_MODEL)),
                ('category', models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, related_name='posts', to='board.Category')),
            ],
        ),
        migrations.AddField(
            model_name='comment',
            name='post',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='board.Post'),
        ),
    ]
Example #3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('user', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Board',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('content', models.TextField(default='')),
                ('hit', models.IntegerField(default=0)),
                ('regdate', models.DateTimeField(auto_now=True)),
                ('groupno', models.IntegerField(default=0)),
                ('orderno', models.IntegerField(default=0)),
                ('depth', models.IntegerField(default=0)),
                ('status',
                 django_enumfield.db.fields.EnumField(
                     default=0, enum=board.models.BoardStatus)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='user.User')),
            ],
        ),
    ]
Example #4
0
class Migration(migrations.Migration):

    dependencies = [
        ('board', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('author', models.CharField(max_length=200)),
                ('text', models.TextField()),
                ('created_date',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('approved_comment', models.BooleanField(default=False)),
            ],
        ),
        migrations.AlterField(
            model_name='post',
            name='text',
            field=models.TextField(
                validators=[board.models.min_length_10_validator]),
        ),
        migrations.AlterField(
            model_name='post',
            name='title',
            field=models.CharField(
                max_length=30,
                validators=[board.models.min_length_3_validator]),
        ),
        migrations.AddField(
            model_name='comment',
            name='post',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='comments',
                to='board.Post'),
        ),
    ]
Example #5
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Board',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=30)),
                ('slug', models.SlugField(unique=True)),
                ('image',
                 models.ImageField(blank=True,
                                   height_field='height_field',
                                   null=True,
                                   upload_to=board.models.u_loc,
                                   width_field='width_field')),
                ('height_field', models.IntegerField(default=0)),
                ('width_field', models.IntegerField(default=0)),
                ('content', models.TextField(max_length=150)),
                ('draft', models.BooleanField(default=False)),
                ('publish', models.DateField()),
                ('updated', models.DateTimeField(auto_now=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('tags', models.CharField(default='', max_length=30)),
                ('user',
                 models.ForeignKey(default=1,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-timestamp', '-updated'],
            },
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ("board", "0002_game_code"),
    ]

    operations = [
        migrations.AlterField(
            model_name="game",
            name="code",
            field=models.CharField(
                choices=[
                    ("R", "RED"),
                    ("G", "GREEN"),
                    ("B", "BLUE"),
                    ("O", "ORANGE"),
                    ("P", "PURPLE"),
                    ("Y", "YELLOW"),
                ],
                default=board.models.create_code,
                max_length=4,
            ),
        ),
    ]
Example #7
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('team_name', models.CharField(max_length=30)),
                ('created_date', models.DateTimeField(default=django.utils.timezone.now)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=150, validators=[board.models.min_length_5_validator])),
                ('content', models.TextField()),
                ('created_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('published_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('team_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='board.team')),
            ],
        ),
        migrations.CreateModel(
            name='JoinedTeam',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('team_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='board.team')),
                ('user_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='CommentProblem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('problem', models.IntegerField()),
                ('content', models.TextField(default='', max_length=300)),
                ('created_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('team_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='board.team')),
            ],
        ),
        migrations.CreateModel(
            name='CommentPost',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField(max_length=300)),
                ('created_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('post_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='board.post')),
            ],
        ),
        migrations.CreateModel(
            name='Code',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('problem_no', models.IntegerField()),
                ('one_line_comment', models.CharField(max_length=50)),
                ('content', models.TextField()),
                ('success', models.BooleanField(default=False)),
                ('display', models.BooleanField(default=True)),
                ('created_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('user_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #8
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('taggit', '0002_auto_20150616_2121'),
    ]

    operations = [
        migrations.CreateModel(
            name='Board',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('board_name', models.CharField(max_length=255)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('private', models.BooleanField(default=False)),
                ('description',
                 models.TextField(blank=True, default='', max_length=500)),
                ('video', models.CharField(blank=True, max_length=50)),
                ('hero',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=board.models.user_directory_path)),
                ('show_video', models.BooleanField(default=False)),
                ('active', models.BooleanField(default=False)),
                ('slug', models.SlugField(default='')),
                ('deleteable', models.BooleanField(default=True)),
                ('recommended', models.BooleanField(default=False)),
                ('tags',
                 taggit.managers.TaggableManager(
                     blank=True,
                     help_text='A comma-separated list of tags.',
                     through='taggit.TaggedItem',
                     to='taggit.Tag',
                     verbose_name='Tags')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='BoardLike',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('board',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='board.Board')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='BoardPrivacy',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('board',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='board.Board')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='BoardView',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ip', models.CharField(max_length=16)),
                ('board',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='board.Board')),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('item_name', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='ItemConnection',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 sorl.thumbnail.fields.ImageField(
                     default='defaults/no-item.png',
                     upload_to='uploads/items/')),
                ('img_own', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('allow_comments',
                 models.BooleanField(default=True,
                                     verbose_name='allow comments')),
                ('purchase_url', models.URLField(blank=True, max_length=255)),
                ('original_purchase_url',
                 models.URLField(blank=True, max_length=255)),
                ('item_desc',
                 models.CharField(blank=True, max_length=500, null=True)),
                ('review',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=500,
                                  null=True)),
                ('rating', models.CharField(default=0, max_length=500)),
                ('item_status',
                 models.CharField(choices=[('WNT', 'I want this'),
                                           ('GOT', "I've got this")],
                                  default='WNT',
                                  max_length=3)),
                ('active', models.BooleanField(default=True)),
                ('board',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='board.Board')),
                ('item',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='board.Item')),
            ],
        ),
        migrations.CreateModel(
            name='ItemLike',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('item_conx',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='board.ItemConnection')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ItemView',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ip', models.CharField(max_length=16)),
                ('item_conx',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='board.ItemConnection')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #9
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('rentGu', models.CharField(max_length=20)),
                ('rentDong', models.CharField(max_length=20)),
                ('stationName', models.CharField(max_length=100)),
                ('stationNum',
                 models.IntegerField(default=0,
                                     primary_key=True,
                                     serialize=False)),
                ('stationValue', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Rent',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('rentTime', models.DateTimeField()),
                ('stationName', models.CharField(max_length=100)),
                ('stationNum',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='board.Address')),
            ],
            options={
                'ordering': ['rentTime'],
            },
        ),
        migrations.CreateModel(
            name='Recede',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('recedeTime', models.DateTimeField()),
                ('stationName', models.CharField(max_length=100)),
                ('stationNum',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='board.Address')),
            ],
            options={
                'ordering': ['recedeTime'],
            },
        ),
        migrations.CreateModel(
            name='Notice',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=150)),
                ('content', models.TextField()),
                ('image',
                 models.ImageField(blank=True,
                                   upload_to=board.models.notices_image_path)),
                ('upload',
                 models.FileField(blank=True,
                                  upload_to=board.models.notices_image_path)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=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')),
                ('content', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('notice',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='board.Notice')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Board',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('description', models.CharField(default='', max_length=300)),
                ('visibility',
                 models.CharField(choices=[('Public', 'Public'),
                                           ('Private', 'Private')],
                                  default='Public',
                                  max_length=50)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_modified', models.DateTimeField(auto_now=True)),
                ('member',
                 models.ManyToManyField(blank=True,
                                        related_name='members',
                                        to=settings.AUTH_USER_MODEL)),
                ('owner',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='admin',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='List',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('archived', models.BooleanField(default=False)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_modified', models.DateTimeField(auto_now=True)),
                ('board',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='board.Board')),
            ],
        ),
        migrations.CreateModel(
            name='Ticket',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('description',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=300,
                                  null=True)),
                ('archived', models.BooleanField(default=False)),
                ('deadline', models.DateField(null=True)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_modified', models.DateTimeField(auto_now=True)),
                ('assigned',
                 models.ManyToManyField(blank=True,
                                        to=settings.AUTH_USER_MODEL)),
                ('lists',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='board.List')),
            ],
        ),
        migrations.CreateModel(
            name='Progress',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('progress', models.IntegerField(default=0)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_modified', models.DateTimeField(auto_now=True)),
                ('ticket',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='board.Ticket')),
            ],
        ),
        migrations.CreateModel(
            name='InviteToBoard',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('confirmed', models.BooleanField(default=False)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_modified', models.DateTimeField(auto_now=True)),
                ('board',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='board.Board')),
                ('invited_by',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='invited_by',
                     to=settings.AUTH_USER_MODEL)),
                ('user',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='invited',
                     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', models.TextField()),
                ('file',
                 models.FileField(
                     null=True,
                     upload_to=board.models.ticket_file_upload_path)),
                ('image',
                 models.ImageField(
                     null=True,
                     upload_to=board.models.ticket_image_file_upload_path)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_modified', models.DateTimeField(auto_now=True)),
                ('ticket',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='board.Ticket')),
                ('user',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Checklist',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('done', models.BooleanField(default=False)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_modified', models.DateTimeField(auto_now=True)),
                ('progress',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='board.Progress')),
            ],
        ),
        migrations.CreateModel(
            name='ActivityLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('activity', models.CharField(max_length=250)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_modified', models.DateTimeField(auto_now=True)),
                ('board',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='board.Board')),
            ],
        ),
    ]
Example #11
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(help_text='포스팅 제목을 입력해주세요. 최대 100자 내외.',
                                  max_length=100,
                                  verbose_name='제목')),
                ('content', models.TextField(verbose_name='내용')),
                ('photo',
                 imagekit.models.fields.ProcessedImageField(
                     blank=True, upload_to='board/post/%Y/%m/%d')),
                ('tags', models.CharField(blank=True, max_length=100)),
                ('lnglat',
                 models.CharField(blank=True,
                                  help_text='경도/위도 포맷으로 입력',
                                  max_length=50,
                                  validators=[board.models.lnglat_validator])),
                ('status',
                 models.CharField(choices=[('d', 'Draft'), ('p', 'Published'),
                                           ('w', 'Withdrawn')],
                                  max_length=1)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('tag_set', models.ManyToManyField(blank=True,
                                                   to='board.Tag')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('author', models.CharField(max_length=20)),
                ('message', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('post',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='board.Post')),
            ],
        ),
    ]
Example #12
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Attachment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='file name')),
                ('uid',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  unique=True,
                                  verbose_name='public identifier')),
                ('created',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='created time')),
                ('file',
                 models.FileField(upload_to=board.models.upload_directory_path,
                                  verbose_name='uploaded file')),
            ],
            options={
                'verbose_name': 'attachment',
                'verbose_name_plural': 'attachments',
            },
        ),
        migrations.CreateModel(
            name='Board',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 model_utils.fields.AutoCreatedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='created')),
                ('modified',
                 model_utils.fields.AutoLastModifiedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='modified')),
                ('title', models.CharField(max_length=250,
                                           verbose_name='title')),
                ('slug',
                 models.SlugField(
                     allow_unicode=True,
                     help_text=
                     'A short label containing only letters, numbers, underscores or hyphens for URL',
                     max_length=255,
                     unique=True,
                     verbose_name='slug')),
                ('theme',
                 models.CharField(default='default',
                                  max_length=250,
                                  verbose_name='theme')),
                ('allow_comments',
                 models.BooleanField(default=True,
                                     verbose_name='allow comments')),
                ('chunk_size',
                 models.PositiveIntegerField(
                     default=20, verbose_name='pagination chunk size')),
                ('block_size',
                 models.PositiveIntegerField(
                     default=10, verbose_name='pagination block size')),
            ],
            options={
                'verbose_name': 'board',
                'verbose_name_plural': 'boards',
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 model_utils.fields.AutoCreatedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='created')),
                ('modified',
                 model_utils.fields.AutoLastModifiedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='modified')),
                ('title', models.CharField(max_length=128,
                                           verbose_name='title')),
                ('slug',
                 models.SlugField(
                     allow_unicode=True,
                     help_text=
                     'A short label containing only letters, numbers, underscores or hyphens for URL',
                     max_length=255,
                     unique=True,
                     verbose_name='slug')),
                ('lft',
                 models.PositiveIntegerField(db_index=True, editable=False)),
                ('rght',
                 models.PositiveIntegerField(db_index=True, editable=False)),
                ('tree_id',
                 models.PositiveIntegerField(db_index=True, editable=False)),
                ('level',
                 models.PositiveIntegerField(db_index=True, editable=False)),
                ('board',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='categories',
                     to='board.Board',
                     verbose_name='category')),
                ('parent',
                 mptt.fields.TreeForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='children',
                     to='board.Category',
                     verbose_name='parent')),
            ],
            options={
                'verbose_name': 'category',
                'verbose_name_plural': 'categories',
            },
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 model_utils.fields.AutoCreatedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='created')),
                ('modified',
                 model_utils.fields.AutoLastModifiedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='modified')),
                ('is_removed', models.BooleanField(default=False)),
                ('title',
                 models.CharField(
                     help_text=
                     "The page title as you'd like it to be seen by the public",
                     max_length=255,
                     verbose_name='title')),
                ('description',
                 models.CharField(
                     blank=True,
                     help_text=
                     "A short description not longer than 155 characters. Don't use double quotes.",
                     max_length=255,
                     verbose_name='description')),
                ('keywords',
                 models.CharField(
                     blank=True,
                     help_text=
                     "A comma-separated list of keywords. Don't use double quotes.",
                     max_length=255,
                     verbose_name='keywords')),
                ('nickname',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='nickname')),
                ('content', models.TextField(verbose_name='content')),
                ('status',
                 models.IntegerField(choices=[(0, 'published'),
                                              (1, 'moderated')],
                                     db_index=True,
                                     default=0,
                                     verbose_name='status')),
                ('secret',
                 models.BooleanField(default=False, verbose_name='secret')),
                ('sticky',
                 models.BooleanField(default=False, verbose_name='sticky')),
                ('markup',
                 models.IntegerField(choices=[(0, 'html'), (1, 'markdown'),
                                              (2, 'text')],
                                     default=0,
                                     verbose_name='markup')),
                ('view_count',
                 models.PositiveIntegerField(default=0,
                                             verbose_name='view count')),
                ('ip_address',
                 models.GenericIPAddressField(verbose_name='IP address')),
                ('board',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='messages',
                                   to='board.Board',
                                   verbose_name='board')),
                ('category',
                 mptt.fields.TreeForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='board.Category',
                     verbose_name='category')),
                ('owner',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='board_message_owned',
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='owner')),
            ],
            options={
                'verbose_name': 'message',
                'verbose_name_plural': 'messages',
                'ordering': ['-created'],
            },
        ),
        migrations.AddField(
            model_name='attachment',
            name='message',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='attachments',
                to='board.Message',
                verbose_name='message'),
        ),
    ]
Example #13
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='VideoGroup',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('group_name',
                 models.TextField(help_text='재생목록 제목', max_length=150)),
                ('public_status',
                 models.CharField(
                     choices=[('0', 'Nothing'), ('1', 'Public'),
                              ('2', 'Private'), ('3', 'Partial')],
                     default=0,
                     max_length=1,
                     validators=[board.models.validate_public_status])),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('video',
                 models.FileField(
                     upload_to='board/post/%Y/%m/%d/',
                     validators=[
                         django.core.validators.FileExtensionValidator(
                             allowed_extensions=[
                                 'avi', 'mp4', 'mkv', 'mpeg', 'webm'
                             ])
                     ])),
                ('author',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.RESTRICT,
                     related_name='video_author',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['author'],
            },
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('title', models.CharField(max_length=100)),
                ('thumb_nail',
                 models.ImageField(
                     upload_to='board/post/%Y/%m/%d/',
                     validators=[
                         django.core.validators.FileExtensionValidator(
                             allowed_extensions=['png', 'jpg', 'jpeg'])
                     ])),
                ('description',
                 models.TextField(blank=True,
                                  help_text='시청자에게 동영상에 대해 알려주세요',
                                  max_length=5000)),
                ('views_count', models.PositiveBigIntegerField(default=0)),
                ('public_status',
                 models.CharField(
                     choices=[('0', 'Nothing'), ('1', 'Public'),
                              ('2', 'Private'), ('3', 'Partial')],
                     default=0,
                     max_length=1,
                     validators=[board.models.validate_public_status])),
                ('author',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.RESTRICT,
                     related_name='post_author',
                     to=settings.AUTH_USER_MODEL)),
                ('post_group',
                 models.ManyToManyField(blank=True, to='board.VideoGroup')),
                ('video',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='post_video',
                     to='board.video')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('message', models.TextField(max_length=300)),
                ('author',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.RESTRICT,
                     to=settings.AUTH_USER_MODEL)),
                ('post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='board.post')),
            ],
            options={
                'ordering': ['-id'],
            },
        ),
    ]