Merge remote-tracking branch 'origin/main'

This commit is contained in:
SBD
2023-12-08 19:57:48 +03:00
3 changed files with 12 additions and 8 deletions

View File

@@ -140,6 +140,10 @@ admin.site.register(StaticPage,Admin_StaticPage)
class Admin_Block(Admin_Trans_BaseModelViewPage): class Admin_Block(Admin_Trans_BaseModelViewPage):
def formfield_for_dbfield(self, db_field, request, **kwargs):
field = super(Admin_Block, self).formfield_for_dbfield(db_field, request, **kwargs)
return sets_for_formfield_for_dbfield(field, db_field)
def obj_name(self, obj): def obj_name(self, obj):
try: try:
return obj.content_object return obj.content_object
@@ -155,8 +159,10 @@ class Admin_Block(Admin_Trans_BaseModelViewPage):
('block_type', ('block_type',
# 'title', # 'title',
'name', 'description'), 'name', 'description'),
('picture', 'video_url'), ('picture',),
('bg_color', 'bg_image', 'bg_video_url'), ('video_url',),
('bg_color', 'bg_image'),
# ('bg_video_url', ),
('but_title', 'but_color', 'but_icon'), ('but_title', 'but_color', 'but_icon'),
('url',), ('url',),
( (

View File

@@ -1,9 +1,8 @@
{% include 'blocks/b_services_3cols_w_groups.html' %} {% include 'blocks/b_services_3cols_w_groups.html' %}
{% include "pages/content/c_blocks_constructor.html" %}
{% if page.plugin_presentation.all %} {% if page.plugin_presentation.all %}
{% include 'blocks/b_3d_s_d.html' with block=page.plugin_presentation.all.0 %} {% include 'blocks/b_3d_s_d.html' with block=page.plugin_presentation.all.0 %}
{% endif %} {% endif %}
{% include "pages/content/c_blocks_constructor.html" %}

View File

@@ -1,9 +1,8 @@
{% include 'blocks/b_services_2_col_wo_group.html' %} {% include 'blocks/b_services_2_col_wo_group.html' %}
{% include "pages/content/c_blocks_constructor.html" %}
{% if page.plugin_presentation.all %} {% if page.plugin_presentation.all %}
{% include 'blocks/b_3d_s_d.html' with block=page.plugin_presentation.all.0 %} {% include 'blocks/b_3d_s_d.html' with block=page.plugin_presentation.all.0 %}
{% endif %} {% endif %}
{% include "pages/content/c_blocks_constructor.html" %}