description news availability management from BO

This commit is contained in:
Kuroshini 2019-12-16 23:48:55 +03:00
parent 0a25ec3e7c
commit b34ab11fd8
3 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 2.2.7 on 2019-12-16 20:44
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('news', '0043_auto_20191216_1920'),
]
operations = [
migrations.RenameField(
model_name='news',
old_name='description_to_locale_is_active',
new_name='locale_to_description_is_active',
),
]

View File

@ -179,7 +179,7 @@ class News(GalleryModelMixin, BaseAttributes, TranslatedFieldsMixin, HasTagsMixi
description = TJSONField(blank=True, null=True, default=None,
verbose_name=_('description'),
help_text='{"en-GB":"some text"}')
description_to_locale_is_active = HStoreField(null=True, default=dict, blank=True,
locale_to_description_is_active = HStoreField(null=True, default=dict, blank=True,
verbose_name=_('Is description for certain locale active'),
help_text='{"en-GB": true, "fr-FR": false}')
start = models.DateTimeField(blank=True, null=True, default=None,

View File

@ -182,6 +182,7 @@ class NewsBackOfficeBaseSerializer(NewsBaseSerializer):
'backoffice_title',
'subtitle',
'slugs',
'locale_to_description_is_active',
'is_published',
'duplication_date',
)