FAQ admin
This commit is contained in:
SDE
2023-11-25 16:31:10 +03:00
parent 4f2c7aeb2c
commit 7831973cdb
13 changed files with 81 additions and 69 deletions

View File

@@ -5,7 +5,7 @@ from django.utils.translation import gettext_lazy as _
from ckeditor_uploader.fields import RichTextUploadingField
class StaticPage(BaseModelViewPage):
promo_header = models.BooleanField(verbose_name='Промо-хэдер', default=False)
promo_header = models.BooleanField(verbose_name=_('Промо-хэдер'), default=False)
class Meta:
verbose_name = _('Статическая страница')
@@ -17,9 +17,9 @@ class Block(BaseModelViewPage):
verbose_name_plural = _('Блоки на страницах')
class Option(BaseModel):
opt_type = models.CharField(max_length=250, verbose_name='Тип', blank=True, null=True)
prefix = models.CharField(max_length=250, verbose_name='Префикс', blank=True, null=True)
value = models.CharField(max_length=250, verbose_name='Значение')
opt_type = models.CharField(max_length=250, verbose_name=_('Тип'), blank=True, null=True)
prefix = models.CharField(max_length=250, verbose_name=_('Префикс'), blank=True, null=True)
value = models.CharField(max_length=250, verbose_name=_('Значение'))
picture = models.ImageField(upload_to='uploads/', verbose_name=_('Миниатюра'), null=True, blank=True,
help_text=u'')
@@ -36,8 +36,8 @@ class FAQitem(BaseModel):
object_id = models.PositiveIntegerField()
content_object = GenericForeignKey('content_type', 'object_id')
question = models.TextField(verbose_name='Вопрос')
answer = RichTextUploadingField(verbose_name='Ответ')
question = models.TextField(verbose_name=_('Вопрос'))
answer = RichTextUploadingField(verbose_name=_('Ответ'))
def __str__(self):
if self.question: