Merge remote-tracking branch 'origin/main'

This commit is contained in:
SBD
2023-11-29 11:44:08 +03:00
7 changed files with 58 additions and 35 deletions

View File

@@ -11,6 +11,14 @@ from django.db.models.query import QuerySet
from django.template import Library
from django.utils.html import mark_safe
@register.filter
@stringfilter
def split_string_by_enter(value):
val_list = value.split('\r\n')
return val_list
@register.filter('get_value_from_dict')
def get_value_from_dict(dict_data, key):
"""

View File

@@ -51,7 +51,7 @@ class Admin_Section(SuperModelAdmin, Admin_Trans_BaseModelViewPage):
'classes': ['wide'],
'fields': ('name',
'url',
# 'title',
'title',
'description', 'text',
'picture',
'order',

View File

@@ -51,7 +51,7 @@ def get_content_for_section_ajax(request):
# els_footer_list = [one_list_el]
#
Dict = {
'cur_section': section,
'page': section,
# 'sections': get_sections(),
# 'services': services,
}
@@ -59,7 +59,7 @@ def get_content_for_section_ajax(request):
from .funcs import get_section_views_Dict
Dict.update(get_section_views_Dict(section))
html = render_to_string('pages/content/c_blocks_constructor.html', Dict, request=request)
html = render_to_string('pages/content/c_section_content.html', Dict, request=request)
res_Dict = {
'html': html,

View File

@@ -1,4 +1,6 @@
{% load static %}
{% load base_tags_extra %}
<div class="cut-width">
<div class="block_how_dev">
<div class="large_txt block_how_dev_title">{{ block.name }}</div>
@@ -22,7 +24,9 @@
</div>
<div class="list_characters_widget_how_dev_container">
<ul class="list_characters_widget_how_dev">
<li class="standart_txt">{{ w.text }}</li>
{% for item_s in w.text|split_string_by_enter %}
<li class="standart_txt">{{ item_s }}</li>
{% endfor %}
</ul>
</div>
</div>

View File

@@ -1,13 +1,13 @@
{% include 'blocks/dynamic/b_sections_buttons.html' %}
{% if services_view_scheme == '3_cols_w_group' %}
{% include 'blocks/b_service.html' %}
{% elif services_view_scheme == '2_cols_wo_group' %}
{% include 'blocks/b_service_2_col.html' %}
{% endif %}
{#{% include 'blocks/dynamic/b_sections_buttons.html' %}#}
{#{% if services_view_scheme == '3_cols_w_group' %}#}
{# {% include 'blocks/b_service.html' %}#}
{#{% elif services_view_scheme == '2_cols_wo_group' %}#}
{# {% include 'blocks/b_service_2_col.html' %}#}
{#{% endif %}#}
{#{% include 'blocks/b_how_with_us_working.html' %}#}
{% for block in cur_section.blocks.all %}
{% for block in page.blocks.all %}
{% if block.block_type == 'photo150_n_title' %}
{% include 'blocks/b_photo150_n_title.html' %}
{% elif block.block_type == 'how_work' %}
@@ -22,6 +22,6 @@
{% endfor %}
{% if cur_section.plugin_presentation.all %}
{% include 'blocks/b_3d_s_d.html' with block=cur_section.plugin_presentation.all.0 %}
{% if page.plugin_presentation.all %}
{% include 'blocks/b_3d_s_d.html' with block=page.plugin_presentation.all.0 %}
{% endif %}

View File

@@ -0,0 +1,32 @@
{% include 'blocks/dynamic/b_sections_buttons.html' %}
{% if page.description %}
<div>{{ page.description }}</div>
{% endif %}
{% if page.title %}
<div>{{ page.title }}</div>
{% endif %}
{% if services_view_scheme == '3_cols_w_group' %}
{% include 'blocks/b_service.html' %}
{% elif services_view_scheme == '2_cols_wo_group' %}
{% include 'blocks/b_service_2_col.html' %}
{% endif %}
{% include "pages/content/c_blocks_constructor.html" %}
{#{% for block in page.blocks.all %}#}
{# {% if block.block_type == 'photo150_n_title' %}#}
{# {% include 'blocks/b_photo150_n_title.html' %}#}
{# {% elif block.block_type == 'how_work' %}#}
{# {% include 'blocks/b_how_with_us_working.html' %}#}
{# {% elif block.block_type == 'feedback_form' %}#}
{# {% include 'forms/f_consultation.html' %}#}
{# {% elif block.block_type == 'how_dev' %}#}
{# {% include 'blocks/b_how_dev.html' %}#}
{# {% endif %}#}
{##}
{#{% endfor %}#}
{#{% if page.plugin_presentation.all %}#}
{# {% include 'blocks/b_3d_s_d.html' with block=page.plugin_presentation.all.0 %}#}
{#{% endif %}#}

View File

@@ -1,25 +1,4 @@
{% extends 'tb_base.html' %}
{% block CONTENT %}
{% include 'blocks/dynamic/b_sections_buttons.html' %}
{% if services_view_scheme == '3_cols_w_group' %}
{% include 'blocks/b_service.html' %}
{% elif services_view_scheme == '2_cols_wo_group' %}
{% include 'blocks/b_service_2_col.html' %}
{% endif %}
{% for block in page.blocks.all %}
{% if block.block_type == 'photo150_n_title' %}
{% include 'blocks/b_photo150_n_title.html' %}
{% elif block.block_type == 'how_work' %}
{% include 'blocks/b_how_with_us_working.html' %}
{% elif block.block_type == 'feedback_form' %}
{% include 'forms/f_consultation.html' %}
{% elif block.block_type == 'how_dev' %}
{% include 'blocks/b_how_dev.html' %}
{% endif %}
{% endfor %}
{% if page.plugin_presentation.all %}
{% include 'blocks/b_3d_s_d.html' with block=page.plugin_presentation.all.0 %}
{% endif %}
{% include "pages/content/c_section_content.html" %}
{% endblock %}