class BlockAppearance(models.Model): class Meta: verbose_name_plural = u"Оформления" verbose_name = u"оформление" bg_image = models.ImageField(verbose_name=u"Изображение фона", upload_to=u"slider", help_text=u"размер 2560x835", blank=True, null=True) cdn_bg_image = CDNField(parent_field=bg_image) bg_color = ColorField(verbose_name=u"Цвет фона", blank=True, null=True, default='#ffffff') top_gradient_color = ColorField(verbose_name=u"Цвет градиента сверху", blank=True, null=True, default='#ffffff') bottom_gradient_color = ColorField(verbose_name=u"Цвет градиента снизу", blank=True, null=True, default='#ffffff') content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE) object_id = models.PositiveIntegerField() customizable_object = GenericForeignKey('content_type', 'object_id')
class GalleryItems(BaseOrderModel, SliderItem): class Meta: verbose_name_plural = u"Изображения галлереи" verbose_name = u"изображение" object = models.ForeignKey(GallerySlider, blank=True, null=True, related_name="items")
class Migration(migrations.Migration): dependencies = [ ('login', '0001_initial'), ('main', '0001_initial'), ] operations = [ migrations.CreateModel( name='Task', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=255)), ('status', models.IntegerField(choices=[(1, 'Done'), (2, 'Pending'), (3, 'Missed')], default=2)), ('date', models.DateField( validators=[apps.main.models.validate_future_date])), ('time', models.TimeField()), ('created_at', models.DateField(auto_now_add=True)), ('updated_at', models.DateField(auto_now=True)), ('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='itemcreater', to='login.User')), ], managers=[ ('taskMgr', django.db.models.manager.Manager()), ], ), migrations.RemoveField( model_name='book', name='author', ), migrations.RemoveField( model_name='review', name='book', ), migrations.RemoveField( model_name='review', name='user', ), migrations.DeleteModel(name='Author', ), migrations.DeleteModel(name='Book', ), migrations.DeleteModel(name='Review', ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0008_alter_user_username_max_length'), ] operations = [ migrations.CreateModel( name='User', 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')), ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')), ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')), ('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')), ('phone', models.CharField(default='110', max_length=11)), ('desc', models.CharField(blank=True, max_length=255, null=True)), ('icon', models.ImageField(default='apps/static/img/default.png', upload_to='upload/img/%Y%m%d', verbose_name='头像')), ('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': '用户管理', 'verbose_name_plural': '用户管理', 'db_table': 'user', }, managers=[ ('objects', django.contrib.auth.models.UserManager()), ], ), migrations.CreateModel( name='Banner', fields=[ ('banner_id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=100, verbose_name='标题')), ('image', models.ImageField(storage=apps.main.models.ImageStorage(), upload_to='banner/%Y%m%d', verbose_name='轮播图')), ('detail_url', models.URLField(verbose_name='访问地址')), ('order', models.IntegerField(default=1, verbose_name='顺序')), ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='添加时间')), ], options={ 'verbose_name': '轮播图', 'verbose_name_plural': '轮播图', 'db_table': 'banner', }, ), migrations.CreateModel( name='Category', fields=[ ('cate_id', models.AutoField(primary_key=True, serialize=False, verbose_name='分类ID')), ('name', models.CharField(max_length=255, unique=True, verbose_name='名称')), ], options={ 'verbose_name': '分类菜单', 'verbose_name_plural': '菜单管理', 'db_table': 'category', }, ), migrations.CreateModel( name='Image', fields=[ ('shop_img_id', models.AutoField(primary_key=True, serialize=False)), ('type', models.CharField(blank=True, max_length=32, null=True, verbose_name='图片类型')), ], options={ 'verbose_name': '商品图片', 'verbose_name_plural': '商品图片管理', 'db_table': 'shop_image', }, ), migrations.CreateModel( name='Navigation', fields=[ ('nav_id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID')), ('nav_name', models.CharField(max_length=64, verbose_name='名称')), ], options={ 'verbose_name': '导航', 'verbose_name_plural': '导航', 'db_table': 'navigation', }, ), migrations.CreateModel( name='Order', fields=[ ('oid', models.AutoField(primary_key=True, serialize=False, verbose_name='订单ID')), ('order_code', models.CharField(max_length=255, verbose_name='订单号')), ('address', models.CharField(max_length=255, verbose_name='配送地址')), ('post', models.CharField(max_length=255, verbose_name='邮编')), ('receiver', models.CharField(max_length=255, verbose_name='收货人')), ('mobile', models.CharField(max_length=11, verbose_name='手机号')), ('user_message', models.CharField(max_length=255, verbose_name='附加信息')), ('create_date', models.DateTimeField(max_length=0, verbose_name='创建日期')), ('pay_date', models.DateTimeField(blank=True, max_length=0, null=True, verbose_name='支付时间')), ('delivery_date', models.DateTimeField(blank=True, null=True, verbose_name='交易日期')), ('confirm_date', models.DateTimeField(blank=True, null=True, verbose_name='确认日期')), ('status', models.IntegerField(choices=[(1, '正常'), (0, '异常'), (-1, '删除')], default=1, verbose_name='订单状态')), ('user', models.ForeignKey( db_column='uid', on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='用户ID')), ], options={ 'verbose_name': '订单', 'verbose_name_plural': '订单管理', 'db_table': 'order', }, ), migrations.CreateModel( name='Property', fields=[ ('property_id', models.AutoField(primary_key=True, serialize=False, verbose_name='商品属性')), ('name', models.CharField(max_length=64, verbose_name='属性名称')), ('cate', models.ForeignKey( db_column='cate_id', on_delete=django.db.models.deletion.DO_NOTHING, to='main.Category', verbose_name='父菜单')), ], options={ 'verbose_name': '商品属性', 'verbose_name_plural': '商品属性', 'db_table': 'property', }, ), migrations.CreateModel( name='PropertyValue', fields=[ ('pro_value_id', models.IntegerField(primary_key=True, serialize=False, verbose_name='ID')), ('value', models.CharField(max_length=255, verbose_name='属性值')), ('property', models.ForeignKey(db_column='property_id', on_delete=django.db.models.deletion.CASCADE, to='main.Property', verbose_name='属性ID')), ], options={ 'verbose_name': '商品属性值', 'verbose_name_plural': '商品属性值', 'db_table': 'property_value', }, ), migrations.CreateModel( name='Review', fields=[ ('review_id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID')), ('content', models.CharField(max_length=4000, verbose_name='内容')), ('create_date', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')), ], options={ 'verbose_name': '用户评论', 'verbose_name_plural': '用户评论', 'db_table': 'review', }, ), migrations.CreateModel( name='Shop', fields=[ ('shop_id', models.IntegerField(primary_key=True, serialize=False, verbose_name='商品ID')), ('name', models.CharField(max_length=100, verbose_name='商品名称')), ('sub_title', models.CharField(max_length=255, verbose_name='商品标题')), ('original_price', models.DecimalField(decimal_places=2, max_digits=7, verbose_name='原价')), ('promote_price', models.DecimalField(decimal_places=2, max_digits=7, verbose_name='折扣价')), ('stock', models.IntegerField(verbose_name='库存')), ('create_date', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')), ('cate', models.ForeignKey( db_column='cate_id', on_delete=django.db.models.deletion.DO_NOTHING, to='main.Category', verbose_name='商品分类')), ], options={ 'verbose_name': '商品信息', 'verbose_name_plural': '商品管理', 'db_table': 'shop', }, ), migrations.CreateModel( name='ShopCar', fields=[ ('car_id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID')), ('number', models.IntegerField(default=0, verbose_name='商品数量')), ('status', models.IntegerField(default=1)), ('order', models.ForeignKey( db_column='oid', null=True, on_delete=django.db.models.deletion.SET_NULL, to='main.Order', verbose_name='商品ID')), ('shop', models.ForeignKey( on_delete=django.db.models.deletion.DO_NOTHING, to='main.Shop', verbose_name='商品ID')), ('user', models.ForeignKey( db_column='uid', on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='用户ID')), ], options={ 'verbose_name': '购物车', 'verbose_name_plural': '购物车', 'db_table': 'shop_car', }, ), migrations.CreateModel( name='SubMenu', fields=[ ('sub_menu_id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(blank=True, max_length=255, null=True, verbose_name='名称')), ('cate', models.ForeignKey( db_column='cate_id', on_delete=django.db.models.deletion.DO_NOTHING, to='main.Category', verbose_name='父菜单')), ], options={ 'verbose_name': '一级菜单', 'verbose_name_plural': '一级菜单管理', 'db_table': 'sub_menu', }, ), migrations.CreateModel( name='SubMenu2', fields=[ ('sub_menu2_id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=255, verbose_name='名称')), ('sub_menu', models.ForeignKey( db_column='sub_menu_id', on_delete=django.db.models.deletion.DO_NOTHING, to='main.SubMenu', verbose_name='父菜单')), ], options={ 'verbose_name': '二级菜单', 'verbose_name_plural': '二级菜单管理', 'db_table': 'sub_menu2', }, ), migrations.AddField( model_name='review', name='shop', field=models.ForeignKey( db_column='shop_id', on_delete=django.db.models.deletion.DO_NOTHING, to='main.Shop', verbose_name='商品ID'), ), migrations.AddField( model_name='review', name='user', field=models.ForeignKey( db_column='uid', on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='用户ID'), ), migrations.AddField( model_name='propertyvalue', name='shop', field=models.ForeignKey( db_column='shop_id', on_delete=django.db.models.deletion.CASCADE, to='main.Shop', verbose_name='商品ID'), ), migrations.AddField( model_name='image', name='shop', field=models.ForeignKey( db_column='shop_id', on_delete=django.db.models.deletion.DO_NOTHING, to='main.Shop', verbose_name='商品ID'), ), ]
class Migration(migrations.Migration): dependencies = [ ('main', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='address', name='user', ), migrations.AlterModelOptions( name='banner', options={ 'verbose_name': '轮播图', 'verbose_name_plural': '轮播图' }, ), migrations.AlterModelOptions( name='category', options={ 'verbose_name': '分类菜单', 'verbose_name_plural': '菜单管理' }, ), migrations.AlterModelOptions( name='order', options={ 'verbose_name': '订单', 'verbose_name_plural': '订单管理' }, ), migrations.AlterModelOptions( name='property', options={ 'verbose_name': '商品属性', 'verbose_name_plural': '商品属性' }, ), migrations.AlterModelOptions( name='propertyvalue', options={ 'verbose_name': '商品属性值', 'verbose_name_plural': '商品属性值' }, ), migrations.AlterModelOptions( name='review', options={ 'verbose_name': '用户评论', 'verbose_name_plural': '用户评论' }, ), migrations.AlterModelOptions( name='shop', options={ 'verbose_name': '商品信息', 'verbose_name_plural': '商品管理' }, ), migrations.AlterModelOptions( name='shopcar', options={ 'verbose_name': '购物车', 'verbose_name_plural': '购物车' }, ), migrations.AlterModelOptions( name='shopimage', options={ 'verbose_name': '商品图片', 'verbose_name_plural': '商品图片管理' }, ), migrations.AlterModelOptions( name='submenu', options={ 'verbose_name': '一级菜单', 'verbose_name_plural': '一级菜单管理' }, ), migrations.AlterModelOptions( name='submenu2', options={ 'verbose_name': '二级菜单', 'verbose_name_plural': '二级菜单管理' }, ), migrations.AlterModelOptions( name='userprofile', options={ 'verbose_name': '用户管理', 'verbose_name_plural': '用户管理' }, ), migrations.RemoveField( model_name='order', name='uid', ), migrations.RemoveField( model_name='propertyvalue', name='property_id', ), migrations.RemoveField( model_name='propertyvalue', name='shop_id', ), migrations.RemoveField( model_name='review', name='uid', ), migrations.RemoveField( model_name='shopcar', name='oid', ), migrations.RemoveField( model_name='shopcar', name='uid', ), migrations.AddField( model_name='order', name='user', field=models.ForeignKey( db_column='uid', default=1, on_delete=django.db.models.deletion.DO_NOTHING, to='main.UserProfile', verbose_name='用户ID'), preserve_default=False, ), migrations.AddField( model_name='propertyvalue', name='property', field=models.ForeignKey( db_column='property_id', default=1, on_delete=django.db.models.deletion.CASCADE, to='main.Property', verbose_name='属性ID'), preserve_default=False, ), migrations.AddField( model_name='propertyvalue', name='shop', field=models.ForeignKey( db_column='shop_id', default=1, on_delete=django.db.models.deletion.CASCADE, to='main.Shop', verbose_name='商品ID'), preserve_default=False, ), migrations.AddField( model_name='review', name='user', field=models.ForeignKey( db_column='uid', default=1, on_delete=django.db.models.deletion.DO_NOTHING, to='main.UserProfile', verbose_name='用户ID'), preserve_default=False, ), migrations.AddField( model_name='shopcar', name='order', field=models.ForeignKey( db_column='oid', null=True, on_delete=django.db.models.deletion.SET_NULL, to='main.Order', verbose_name='商品ID'), ), migrations.AddField( model_name='shopcar', name='user', field=models.ForeignKey( db_column='uid', default=1, on_delete=django.db.models.deletion.DO_NOTHING, to='main.UserProfile', verbose_name='用户ID'), preserve_default=False, ), migrations.AlterField( model_name='banner', name='banner_id', field=models.AutoField(primary_key=True, serialize=False, verbose_name='ID'), ), migrations.AlterField( model_name='banner', name='create_time', field=models.DateTimeField(auto_now_add=True, default=1, verbose_name='添加时间'), preserve_default=False, ), migrations.AlterField( model_name='banner', name='detail_url', field=models.URLField(verbose_name='访问地址'), ), migrations.AlterField( model_name='banner', name='image', field=models.ImageField(storage=apps.main.models.ImageStorage(), upload_to='banner/%Y%m%d', verbose_name='轮播图'), ), migrations.AlterField( model_name='banner', name='order', field=models.IntegerField(default=1, verbose_name='顺序'), ), migrations.AlterField( model_name='banner', name='title', field=models.CharField(max_length=100, verbose_name='标题'), ), migrations.AlterField( model_name='category', name='cate_id', field=models.AutoField(primary_key=True, serialize=False, verbose_name='分类ID'), ), migrations.AlterField( model_name='category', name='name', field=models.CharField(max_length=255, unique=True, verbose_name='名称'), ), migrations.AlterField( model_name='order', name='address', field=models.CharField(max_length=255, verbose_name='配送地址'), ), migrations.AlterField( model_name='order', name='confirm_date', field=models.DateTimeField(blank=True, null=True, verbose_name='确认日期'), ), migrations.AlterField( model_name='order', name='create_date', field=models.DateTimeField(default=1, max_length=0, verbose_name='创建日期'), preserve_default=False, ), migrations.AlterField( model_name='order', name='delivery_date', field=models.DateTimeField(blank=True, null=True, verbose_name='交易日期'), ), migrations.AlterField( model_name='order', name='mobile', field=models.CharField(max_length=11, verbose_name='手机号'), ), migrations.AlterField( model_name='order', name='oid', field=models.AutoField(primary_key=True, serialize=False, verbose_name='订单ID'), ), migrations.AlterField( model_name='order', name='order_code', field=models.CharField(max_length=255, verbose_name='订单号'), ), migrations.AlterField( model_name='order', name='pay_date', field=models.DateTimeField(blank=True, max_length=0, null=True, verbose_name='支付时间'), ), migrations.AlterField( model_name='order', name='post', field=models.CharField(max_length=255, verbose_name='邮编'), ), migrations.AlterField( model_name='order', name='receiver', field=models.CharField(max_length=255, verbose_name='收货人'), ), migrations.AlterField( model_name='order', name='status', field=models.IntegerField(choices=[(1, '正常'), (0, '异常'), (-1, '删除')], default=1, verbose_name='订单状态'), ), migrations.AlterField( model_name='order', name='user_message', field=models.CharField(max_length=255, verbose_name='附加信息'), ), migrations.AlterField( model_name='property', name='cate', field=models.ForeignKey( db_column='cate_id', on_delete=django.db.models.deletion.DO_NOTHING, to='main.Category', verbose_name='父菜单'), ), migrations.AlterField( model_name='property', name='name', field=models.CharField(max_length=64, verbose_name='属性名称'), ), migrations.AlterField( model_name='property', name='property_id', field=models.AutoField(primary_key=True, serialize=False, verbose_name='商品属性'), ), migrations.AlterField( model_name='propertyvalue', name='pro_value_id', field=models.IntegerField(primary_key=True, serialize=False, verbose_name='ID'), ), migrations.AlterField( model_name='propertyvalue', name='value', field=models.CharField(max_length=255, verbose_name='属性值'), ), migrations.AlterField( model_name='review', name='content', field=models.CharField(max_length=4000, verbose_name='内容'), ), migrations.AlterField( model_name='review', name='create_date', field=models.DateTimeField(auto_now_add=True, default=1, verbose_name='创建时间'), preserve_default=False, ), migrations.AlterField( model_name='review', name='review_id', field=models.AutoField(primary_key=True, serialize=False, verbose_name='ID'), ), migrations.AlterField( model_name='review', name='shop', field=models.ForeignKey( db_column='shop_id', on_delete=django.db.models.deletion.DO_NOTHING, to='main.Shop', verbose_name='商品ID'), ), migrations.AlterField( model_name='shop', name='cate', field=models.ForeignKey( db_column='cate_id', on_delete=django.db.models.deletion.DO_NOTHING, to='main.Category', verbose_name='商品分类'), ), migrations.AlterField( model_name='shop', name='create_date', field=models.DateTimeField(auto_now_add=True, default=1, verbose_name='创建时间'), preserve_default=False, ), migrations.AlterField( model_name='shop', name='name', field=models.CharField(max_length=100, verbose_name='商品名称'), ), migrations.AlterField( model_name='shop', name='original_price', field=models.DecimalField(decimal_places=2, max_digits=7, verbose_name='原价'), ), migrations.AlterField( model_name='shop', name='promote_price', field=models.DecimalField(decimal_places=2, max_digits=7, verbose_name='折扣价'), ), migrations.AlterField( model_name='shop', name='shop_id', field=models.IntegerField(primary_key=True, serialize=False, verbose_name='商品ID'), ), migrations.AlterField( model_name='shop', name='stock', field=models.IntegerField(verbose_name='库存'), ), migrations.AlterField( model_name='shop', name='sub_title', field=models.CharField(max_length=255, verbose_name='商品标题'), ), migrations.AlterField( model_name='shopcar', name='car_id', field=models.AutoField(primary_key=True, serialize=False, verbose_name='ID'), ), migrations.AlterField( model_name='shopcar', name='number', field=models.IntegerField(default=0, verbose_name='商品数量'), ), migrations.AlterField( model_name='shopcar', name='shop', field=models.ForeignKey( on_delete=django.db.models.deletion.DO_NOTHING, to='main.Shop', verbose_name='商品ID'), ), migrations.AlterField( model_name='shopcar', name='status', field=models.IntegerField(default=1), ), migrations.AlterField( model_name='shopimage', name='shop', field=models.ForeignKey( db_column='shop_id', on_delete=django.db.models.deletion.DO_NOTHING, to='main.Shop', verbose_name='商品ID'), ), migrations.AlterField( model_name='shopimage', name='type', field=models.CharField(blank=True, max_length=32, null=True, verbose_name='图片类型'), ), migrations.AlterField( model_name='submenu', name='cate', field=models.ForeignKey( db_column='cate_id', on_delete=django.db.models.deletion.DO_NOTHING, to='main.Category', verbose_name='父菜单'), ), migrations.AlterField( model_name='submenu', name='name', field=models.CharField(blank=True, max_length=255, null=True, verbose_name='名称'), ), migrations.AlterField( model_name='submenu', name='sub_menu_id', field=models.AutoField(primary_key=True, serialize=False, verbose_name='ID'), ), migrations.AlterField( model_name='submenu2', name='name', field=models.CharField(max_length=255, verbose_name='名称'), ), migrations.AlterField( model_name='submenu2', name='sub_menu', field=models.ForeignKey( db_column='sub_menu_id', on_delete=django.db.models.deletion.DO_NOTHING, to='main.SubMenu', verbose_name='父菜单'), ), migrations.AlterField( model_name='submenu2', name='sub_menu2_id', field=models.AutoField(primary_key=True, serialize=False, verbose_name='ID'), ), migrations.AlterField( model_name='userprofile', name='desc', field=models.CharField(max_length=255, null=True), ), migrations.AlterField( model_name='userprofile', name='icon', field=models.ImageField(default='apps/static/img/default.png', upload_to='upload/img/%Y%m%d', verbose_name='头像'), ), migrations.AlterField( model_name='userprofile', name='phone', field=models.CharField(default='110', max_length=11), ), migrations.AlterField( model_name='userprofile', name='uid', field=models.AutoField(primary_key=True, serialize=False, verbose_name='用户ID'), ), migrations.DeleteModel(name='Address', ), migrations.DeleteModel(name='User', ), ]