You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.3 KiB
32 lines
1.3 KiB
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import models, migrations
|
|
import promo.models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Promo',
|
|
fields=[
|
|
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
|
|
('created', models.DateTimeField(auto_now_add=True, verbose_name='Дата и время')),
|
|
('act_from', models.DateTimeField(verbose_name='От')),
|
|
('act_to', models.DateTimeField(verbose_name='До')),
|
|
('title', models.CharField(max_length=512, verbose_name='Заголовок', unique=True)),
|
|
('slug', models.SlugField(max_length=512, verbose_name='Ссылка', unique=True)),
|
|
('text', models.TextField(verbose_name='Акция')),
|
|
('is_public', models.BooleanField(verbose_name='Публиковать', default=True)),
|
|
('image', models.ImageField(verbose_name='Картинка', upload_to=promo.models.photo_filename)),
|
|
],
|
|
options={
|
|
'verbose_name_plural': 'акции',
|
|
'verbose_name': 'акция',
|
|
},
|
|
),
|
|
]
|
|
|