class BasicCaseView(generic.ListView):
def __init__(self):
filtr1 = self.kwargs['filtr']
ff = filtr1
template_name = 'core/basic_modules.html'
context_object_name = 'bases'
class Pages(CommonInfo):
STATUS_CHOICES = (
('draft', 'Черновик'),
('published', 'Опубликовано'),
)
slug = models.CharField(max_length=200, unique=True, verbose_name='url статьи')
cover = models.ImageField(upload_to='cover', height_field=320, width_field=320, max_length=200, verbose_name='Обложка')
color = ColorField(default='#FF0000', verbose_name='Цвет обложки')
body = models.TextField(blank=True, null=True, verbose_name='Содержание страницы')
status = models.CharField(max_length=10, choices=STATUS_CHOICES, default='draft', verbose_name='Статус')
published = PublishedManager()
objects = models.Manager()
(self, force_insert=False, force_update=False, using=None, update_fields=None)
MAX_SIZE_IMAGE = PhotoSettings.get_max_size()