diff --git a/engine/blog/graphene/object_types.py b/engine/blog/graphene/object_types.py index 1039e38c..54d71afc 100644 --- a/engine/blog/graphene/object_types.py +++ b/engine/blog/graphene/object_types.py @@ -15,7 +15,7 @@ class PostType(DjangoObjectType): interfaces = (relay.Node,) def resolve_content(self: Post, _info: HttpRequest) -> str: - return self.content.html.replace("\n", "
") + return self.content or "" class PostTagType(DjangoObjectType): diff --git a/engine/blog/serializers.py b/engine/blog/serializers.py index 57279ac1..9415d0ea 100644 --- a/engine/blog/serializers.py +++ b/engine/blog/serializers.py @@ -19,4 +19,4 @@ class PostSerializer(ModelSerializer): fields = "__all__" def get_content(self, obj: Post) -> str: - return obj.content.html.replace("\n", "
") + return obj.content or "" diff --git a/engine/core/admin.py b/engine/core/admin.py index 9422a73d..94df948e 100644 --- a/engine/core/admin.py +++ b/engine/core/admin.py @@ -454,6 +454,10 @@ class ProductAdmin( ): # noinspection PyClassVar model = Product + actions = ActivationActionsMixin.actions + [ + "export_to_marketplaces", + "ban_from_marketplaces", + ] list_display = ( "sku", "name", @@ -463,7 +467,6 @@ class ProductAdmin( "category", "brand", "price", - "rating", "modified", ) list_filter = ( @@ -511,6 +514,7 @@ class ProductAdmin( "name", "partnumber", "is_digital", + "export_to_marketplaces", ] relation_fields = [ "category", diff --git a/engine/core/locale/ru_RU/LC_MESSAGES/django.mo b/engine/core/locale/ru_RU/LC_MESSAGES/django.mo index 9e0e93ea..38d361d9 100644 Binary files a/engine/core/locale/ru_RU/LC_MESSAGES/django.mo and b/engine/core/locale/ru_RU/LC_MESSAGES/django.mo differ diff --git a/engine/core/locale/ru_RU/LC_MESSAGES/django.po b/engine/core/locale/ru_RU/LC_MESSAGES/django.po index cc33e262..3bbff2e9 100644 --- a/engine/core/locale/ru_RU/LC_MESSAGES/django.po +++ b/engine/core/locale/ru_RU/LC_MESSAGES/django.po @@ -78,7 +78,7 @@ msgstr "Временные метки" #: engine/core/admin.py:158 #, python-format msgid "Activate selected %(verbose_name_plural)s" -msgstr "Активировать выбранный %(verbose_name_plural)s" +msgstr "Активировать выбранные %(verbose_name_plural)s" #: engine/core/admin.py:166 msgid "selected items have been activated." @@ -87,7 +87,7 @@ msgstr "Выбранные сущности активированы!" #: engine/core/admin.py:174 #, python-format msgid "Deactivate selected %(verbose_name_plural)s" -msgstr "Деактивировать выбранный %(verbose_name_plural)s" +msgstr "Деактивировать выбранные %(verbose_name_plural)s" #: engine/core/admin.py:184 msgid "selected items have been deactivated."