From 840a61511e0817d3a55a912cca9b4b7a229fc980 Mon Sep 17 00:00:00 2001 From: SDE Date: Tue, 3 Oct 2023 15:53:08 +0300 Subject: [PATCH] 0.7.51 articles breadcrumbs --- ArticlesApp/views.py | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/ArticlesApp/views.py b/ArticlesApp/views.py index 5fa756e..dbc4c58 100644 --- a/ArticlesApp/views.py +++ b/ArticlesApp/views.py @@ -25,21 +25,22 @@ def get_flat_pages_links_Dict(site): def get_article_breadcrumbs(request, art): # print('get_article_breadcrumbs') - half_count = art.articlesCountInBlock / 2 + articles_add_count = 1 + # half_count = articlesCountInBlock / 2 - art_List = ArticleModel.objects.filter(enable=True, article_DT__gte=art.article_DT).order_by( - 'article_DT')[:half_count] - artListDown = ArticleModel.objects.filter(enable=True, article_DT__lt=art.article_DT).order_by( - '-article_DT')[:art.articlesCountInBlock-len(art_List)] - if len(artListDown)