class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Balance',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('expense', models.FloatField(default=0)),
                ('income', models.FloatField(default=0)),
                ('user', models.OneToOneField(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Expense',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subcategories', models.CharField(max_length=15)),
                ('source', models.CharField(max_length=15)),
                ('paid_to', models.CharField(max_length=50)),
                ('cost', models.IntegerField()),
                ('tax_details', models.FloatField()),
                ('date_created', models.DateField(default=django.utils.timezone.now)),
                ('bill', models.FileField(blank=True, null=True, upload_to='bills')),
                ('vat', models.CharField(blank=True, max_length=50, null=True)),
                ('ext_ref', models.CharField(blank=True, max_length=10, null=True)),
                ('description', models.CharField(blank=True, max_length=100, null=True)),
                ('is_recurrent', models.CharField(max_length=10)),
                ('rec_date', models.DateField(default=django.utils.timezone.now)),
                ('rec_year', models.IntegerField(blank=True, null=True)),
                ('rec_month', models.IntegerField(blank=True, null=True)),
                ('rec_day', models.IntegerField(blank=True, null=True)),
                ('option', models.CharField(max_length=15)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),

        migrations.CreateModel(
            name='UserDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('company_name', models.CharField(max_length=100)),
                ('dob', models.DateField(null=True)),
                ('address', models.CharField(max_length=100)),
                ('hire_date', models.DateField(null=True)),
                ('phone_no', models.IntegerField()),
                ('photo', models.ImageField(null=True, upload_to='profile')),
                ('occupation', models.CharField(max_length=15)),
                ('yearly_package', models.PositiveIntegerField(null=True)),
                ('pf', models.PositiveIntegerField(default=5)),
                ('res_address', models.CharField(max_length=100)),
                ('user', models.OneToOneField(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('Main', '0004_auto_20200704_1553'),
    ]

    operations = [
        migrations.AlterField(
            model_name='movie',
            name='MovImg',
            field=models.ImageField(default='static/cover/default_cover.png',
                                    upload_to=Main.models.cover_directory_path,
                                    verbose_name='电影封面'),
        ),
    ]
Example #3
0
class Migration(migrations.Migration):

    dependencies = [
        ('Main', '0011_menu'),
    ]

    operations = [
        migrations.AlterField(
            model_name='menu',
            name='m_pic',
            field=models.ImageField(blank=True,
                                    null=True,
                                    upload_to=Main.models.directory_url,
                                    verbose_name='사진'),
        ),
    ]
Example #4
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('birthdate', models.DateField()),
                ('avatar', models.ImageField(upload_to=Main.models.get_avatar_upload_path)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('email',
                 models.EmailField(max_length=100,
                                   unique=True,
                                   verbose_name='email')),
                ('name', models.CharField(max_length=50)),
                ('date_joined',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date joined')),
                ('last_login',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='last login')),
                ('profile_image',
                 models.ImageField(
                     blank=True,
                     default=Main.models.get_default_profile_image,
                     max_length=255,
                     null=True,
                     upload_to=Main.models.get_profile_image_filepath)),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Example #6
0
class Migration(migrations.Migration):

    dependencies = [
        ('Main', '0008_profile_p_picture'),
    ]

    operations = [
        migrations.AlterField(
            model_name='boardfiles',
            name='b_file',
            field=models.FileField(upload_to='Board', verbose_name='파일'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='p_picture',
            field=models.ImageField(null=True,
                                    upload_to=Main.models.save_pic_user,
                                    verbose_name='사진'),
        ),
    ]
Example #7
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')),
                ('title', models.CharField(max_length=120)),
                ('image',
                 models.ImageField(blank=True,
                                   height_field='height_field',
                                   null=True,
                                   upload_to=Main.models.upload_location,
                                   width_field='width_field')),
                ('height_field', models.IntegerField(default=0)),
                ('width_field', models.IntegerField(default=0)),
                ('content', models.TextField()),
                ('updated', models.DateTimeField(auto_now=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('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 = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('Main', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=Main.models.upload_location)),
                ('bio', models.TextField(blank=True, null=True)),
                ('questions', models.IntegerField(default=0)),
                ('answers', models.IntegerField(default=0)),
                ('contact', models.TextField(blank=True, null=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AlterField(
            model_name='question',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='Main.Profile'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('Main', '0008_auto_20170812_2231'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='comment',
            name='ref',
        ),
        migrations.RemoveField(
            model_name='house',
            name='date',
        ),
        migrations.AddField(
            model_name='house',
            name='photo',
            field=models.ImageField(blank=True, default=True, upload_to=Main.models.user_directory_path),
        ),
        migrations.DeleteModel(
            name='Comment',
        ),
    ]
Example #10
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Actor',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ActorId',
                 models.CharField(blank=True,
                                  editable=False,
                                  max_length=50,
                                  unique=True,
                                  verbose_name='演员id')),
                ('ActorName',
                 models.CharField(max_length=50, verbose_name='演员姓名')),
                ('ActorArea',
                 models.CharField(blank=True,
                                  default='未知',
                                  max_length=50,
                                  verbose_name='演员地区')),
                ('ActorSex',
                 models.SmallIntegerField(choices=[(1, '男'), (2, '女'),
                                                   (3, '未知')],
                                          default=3,
                                          verbose_name='演员性别')),
            ],
            options={
                'verbose_name': '演员信息',
                'verbose_name_plural': '演员信息',
            },
        ),
        migrations.CreateModel(
            name='ActorConnection',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ActorId',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Main.Actor',
                                   to_field='ActorId',
                                   verbose_name='演员id')),
            ],
            options={
                'verbose_name': '参演信息',
                'verbose_name_plural': '参演信息',
            },
        ),
        migrations.CreateModel(
            name='Agree',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('RecordId',
                 models.CharField(blank=True,
                                  editable=False,
                                  max_length=100,
                                  unique=True,
                                  verbose_name='实体id')),
                ('TargetId',
                 models.CharField(max_length=50, verbose_name='目标id')),
                ('RecordTime', models.DateTimeField(auto_now_add=True)),
                ('AgreeType',
                 models.PositiveSmallIntegerField(choices=[(1, '评论'),
                                                           (2, '标签')],
                                                  verbose_name='点赞类型')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EditRecord',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('RecordId',
                 models.CharField(blank=True,
                                  editable=False,
                                  max_length=100,
                                  unique=True,
                                  verbose_name='实体id')),
                ('TargetId',
                 models.CharField(max_length=50, verbose_name='目标id')),
                ('RecordTime', models.DateTimeField(auto_now_add=True)),
                ('EditType',
                 models.PositiveSmallIntegerField(choices=[(1, '修改信息'),
                                                           (2, '添加标签')],
                                                  verbose_name='编辑类型')),
                ('EditContent', models.TextField(verbose_name='修改内容')),
            ],
            options={
                'verbose_name': '编辑记录',
                'verbose_name_plural': '编辑记录',
            },
        ),
        migrations.CreateModel(
            name='FavoriteRecord',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('RecordId',
                 models.CharField(blank=True,
                                  editable=False,
                                  max_length=100,
                                  unique=True,
                                  verbose_name='实体id')),
                ('TargetId',
                 models.CharField(max_length=50, verbose_name='目标id')),
                ('RecordTime', models.DateTimeField(auto_now_add=True)),
                ('FavoriteType',
                 models.PositiveSmallIntegerField(choices=[(1, '电影')],
                                                  default=1,
                                                  verbose_name='收藏类型')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='IDCount',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Type',
                 models.CharField(max_length=20,
                                  unique=True,
                                  verbose_name='id类型')),
                ('Count',
                 models.PositiveIntegerField(default=0,
                                             editable=False,
                                             verbose_name='计数')),
            ],
        ),
        migrations.CreateModel(
            name='Movie',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('MovId',
                 models.CharField(blank=True,
                                  editable=False,
                                  max_length=50,
                                  unique=True)),
                ('MovName',
                 models.CharField(max_length=100, verbose_name='电影标题')),
                ('MovType', models.IntegerField(verbose_name='电影类型')),
                ('MovLength',
                 models.IntegerField(default=0, verbose_name='电影时长')),
                ('MovImg',
                 models.ImageField(default='static/cover/default_cover.bmp',
                                   upload_to=Main.models.cover_directory_path,
                                   verbose_name='电影封面')),
                ('MovOrigin',
                 models.SmallIntegerField(default=16, verbose_name='电影产地')),
                ('MovCompany',
                 models.CharField(default='未知',
                                  max_length=100,
                                  verbose_name='电影公司')),
                ('MovDirector',
                 models.CharField(default='未知',
                                  max_length=100,
                                  verbose_name='电影导演')),
                ('MovDescription',
                 models.TextField(default='无', verbose_name='电影描述')),
                ('MovDate', models.DateField(default=1,
                                             verbose_name='电影上映时间')),
                ('MovLanguage',
                 models.CharField(default='未知',
                                  max_length=50,
                                  verbose_name='电影语言')),
                ('MovScore',
                 models.FloatField(default=0.0, verbose_name='电影平均分')),
                ('MovScoreCount',
                 models.IntegerField(default=0, verbose_name='评分人数')),
                ('MovImdbId',
                 models.IntegerField(default=0, verbose_name='IMDB')),
                ('MovTmdbId',
                 models.IntegerField(default=0, verbose_name='TMDB')),
            ],
            options={
                'verbose_name': '电影信息',
                'verbose_name_plural': '电影信息',
            },
        ),
        migrations.CreateModel(
            name='MovieTag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('MovTagId',
                 models.CharField(blank=True,
                                  editable=False,
                                  max_length=20,
                                  unique=True)),
                ('MovTagCnt',
                 models.CharField(max_length=20,
                                  unique=True,
                                  verbose_name='标签内容')),
            ],
            options={
                'verbose_name': '电影标签',
                'verbose_name_plural': '电影标签',
            },
        ),
        migrations.CreateModel(
            name='MovTagConnection',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('AgreeCount',
                 models.PositiveIntegerField(default=0,
                                             editable=False,
                                             verbose_name='点赞数')),
                ('MovId',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Main.Movie',
                                   to_field='MovId',
                                   verbose_name='电影id')),
                ('MovTagId',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Main.MovieTag',
                                   to_field='MovTagId',
                                   verbose_name='标签id')),
            ],
            options={
                'verbose_name': '标签联系信息',
                'verbose_name_plural': '标签联系信息',
            },
        ),
        migrations.CreateModel(
            name='ReplyRecord',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('RecordId',
                 models.CharField(blank=True,
                                  editable=False,
                                  max_length=100,
                                  unique=True,
                                  verbose_name='实体id')),
                ('TargetId',
                 models.CharField(max_length=50, verbose_name='目标id')),
                ('RecordTime', models.DateTimeField(auto_now_add=True)),
                ('ReplyType',
                 models.PositiveSmallIntegerField(choices=[(1, '电影'),
                                                           (2, '评论')],
                                                  verbose_name='回复类型')),
                ('ReplyGrade',
                 models.SmallIntegerField(blank=True,
                                          null=True,
                                          verbose_name='评分')),
                ('ReplyContent', models.TextField(verbose_name='回复内容')),
                ('AgreeCount',
                 models.PositiveIntegerField(default=0,
                                             editable=False,
                                             verbose_name='点赞数')),
            ],
            options={
                'verbose_name': '评论记录',
                'verbose_name_plural': '评论记录',
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('UserId',
                 models.CharField(blank=True,
                                  editable=False,
                                  max_length=30,
                                  unique=True,
                                  verbose_name='用户id')),
                ('UserPwd', models.CharField(max_length=20,
                                             verbose_name='密码')),
                ('UserName',
                 models.CharField(max_length=30,
                                  unique=True,
                                  verbose_name='用户名')),
                ('UserLevel',
                 models.SmallIntegerField(default=1, verbose_name='用户等级')),
                ('UserCurExp',
                 models.SmallIntegerField(default=0, verbose_name='用户当前经验')),
                ('UserMaxExp',
                 models.SmallIntegerField(default=1000,
                                          verbose_name='用户最大经验')),
                ('Email', models.EmailField(max_length=254)),
                ('HasView',
                 models.BooleanField(default=False, verbose_name='是否有过浏览记录')),
            ],
            options={
                'verbose_name': '用户信息',
                'verbose_name_plural': '用户信息',
            },
        ),
        migrations.CreateModel(
            name='ViewRecord',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('RecordId',
                 models.CharField(blank=True,
                                  editable=False,
                                  max_length=100,
                                  unique=True,
                                  verbose_name='实体id')),
                ('TargetId',
                 models.CharField(max_length=50, verbose_name='目标id')),
                ('RecordTime', models.DateTimeField(auto_now_add=True)),
                ('UserId',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Main.User',
                                   to_field='UserId',
                                   verbose_name='用户id')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='replyrecord',
            name='UserId',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='Main.User',
                to_field='UserId',
                verbose_name='用户id'),
        ),
        migrations.AddField(
            model_name='favoriterecord',
            name='UserId',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='Main.User',
                to_field='UserId',
                verbose_name='用户id'),
        ),
        migrations.AddField(
            model_name='editrecord',
            name='UserId',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='Main.User',
                to_field='UserId',
                verbose_name='用户id'),
        ),
        migrations.AddField(
            model_name='agree',
            name='UserId',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='Main.User',
                to_field='UserId',
                verbose_name='用户id'),
        ),
        migrations.AddField(
            model_name='actorconnection',
            name='MovId',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='Main.Movie',
                to_field='MovId',
                verbose_name='电影id'),
        ),
        migrations.AlterIndexTogether(
            name='viewrecord',
            index_together={('UserId', 'TargetId')},
        ),
        migrations.AlterUniqueTogether(
            name='movtagconnection',
            unique_together={('MovTagId', 'MovId')},
        ),
        migrations.AlterIndexTogether(
            name='movtagconnection',
            index_together={('MovTagId', 'MovId')},
        ),
        migrations.AlterIndexTogether(
            name='favoriterecord',
            index_together={('UserId', 'TargetId')},
        ),
        migrations.AlterIndexTogether(
            name='agree',
            index_together={('UserId', 'TargetId')},
        ),
        migrations.AlterUniqueTogether(
            name='actorconnection',
            unique_together={('ActorId', 'MovId')},
        ),
        migrations.AlterIndexTogether(
            name='actorconnection',
            index_together={('ActorId', 'MovId')},
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
        ('Main', '0022_auto_20210325_1400'),
    ]

    operations = [
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Name',
                 models.CharField(max_length=2000,
                                  verbose_name='Наименование товара')),
                ('description', models.TextField(default='')),
            ],
        ),
        migrations.AlterField(
            model_name='order',
            name='order_create_time',
            field=models.CharField(blank=True,
                                   default='25.03.2021 16:30',
                                   max_length=1000,
                                   null=True,
                                   verbose_name='Время создания'),
        ),
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('login', models.CharField(blank=True, max_length=150)),
                ('first_name', models.CharField(blank=True, max_length=200)),
                ('last_name', models.CharField(blank=True, max_length=200)),
                ('second_name', models.CharField(blank=True, max_length=200)),
                ('full_name', models.CharField(blank=True, max_length=200)),
                ('bio',
                 models.TextField(blank=True,
                                  help_text='ФИО пользователя',
                                  max_length=500)),
                ('department', models.CharField(blank=True, max_length=30)),
                ('otdel', models.CharField(blank=True, max_length=30)),
                ('photo',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=Main.models.Get_UserName,
                                   verbose_name='Фото пользователя')),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.AddField(
            model_name='order_cart',
            name='products',
            field=models.ManyToManyField(blank=True, to='Main.Product'),
        ),
    ]
Example #12
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=50, null=True)),
                ('PreviewText', models.TextField(null=True)),
                ('PreviewFile',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to=Main.models.upload_path)),
                ('date_created', models.DateField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20, null=True)),
                ('profile_pic',
                 models.ImageField(blank=True, null=True, upload_to='')),
            ],
        ),
        migrations.CreateModel(
            name='Teacher',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20, null=True)),
                ('profile_pic',
                 models.ImageField(blank=True, null=True, upload_to='')),
            ],
        ),
        migrations.CreateModel(
            name='Module',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=50, null=True)),
                ('number', models.IntegerField(null=True)),
                ('File',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to=Main.models.upload_path)),
                ('content', models.TextField(null=True)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Main.Course')),
            ],
        ),
        migrations.AddField(
            model_name='course',
            name='teacher',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='Main.Teacher'),
        ),
    ]
Example #13
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Blog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(default='',
                                  max_length=50,
                                  verbose_name='文章标题')),
                ('content', models.TextField(default='', verbose_name='文章内容')),
                ('is_secret',
                 models.IntegerField(default=0, verbose_name='是否开放')),
                ('summary',
                 models.CharField(default='',
                                  max_length=200,
                                  verbose_name='摘要')),
                ('create_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='创建时间')),
                ('update_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='更新时间')),
            ],
        ),
        migrations.CreateModel(
            name='BlogCategory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('blog',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Main.Blog',
                                   verbose_name='博客')),
            ],
        ),
        migrations.CreateModel(
            name='BlogTags',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('blog',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Main.Blog',
                                   verbose_name='博客')),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(default='',
                                  max_length=50,
                                  verbose_name='类别名称')),
                ('count', models.IntegerField(default=1,
                                              verbose_name='类别下博客数目')),
            ],
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('img', models.ImageField(upload_to=Main.models.get_path)),
                ('blog',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Main.Blog',
                                   verbose_name='博客')),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(default='',
                                  max_length=20,
                                  verbose_name='标签名称')),
                ('count', models.IntegerField(default=1,
                                              verbose_name='标签下博客数目')),
            ],
        ),
        migrations.AddField(
            model_name='blogtags',
            name='tag',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='Main.Tag',
                verbose_name='标签'),
        ),
        migrations.AddField(
            model_name='blogcategory',
            name='category',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='Main.Category',
                verbose_name='类别'),
        ),
    ]