0.7.54
articles paging
This commit is contained in:
@@ -29,7 +29,8 @@ def get_articles(art_kwargs, request_Data=None, from_el=None, to_el=None):
|
||||
|
||||
Dict = {
|
||||
'articles': arts,
|
||||
'last_block': last_block
|
||||
'last_block': last_block,
|
||||
'last_el': to_el
|
||||
}
|
||||
|
||||
return Dict
|
||||
|
||||
@@ -5,6 +5,6 @@ from django.urls import path
|
||||
from .js_views import *
|
||||
|
||||
urlpatterns = [
|
||||
path('get_articles_block/', get_articles_block_ajax, name='get_articles_block_ajax'),
|
||||
|
||||
|
||||
]
|
||||
@@ -33,7 +33,7 @@ def get_articles_block_ajax(request):
|
||||
if 'errors' in Dict:
|
||||
return JsonResponse(Dict, status=400)
|
||||
|
||||
html = render_to_string('blocks/b_news_elements.html', Dict, request=request)
|
||||
html = render_to_string('blocks/articles/b_news_elements.html', Dict, request=request)
|
||||
|
||||
res_Dict = {
|
||||
'html': html,
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
from django.urls import path
|
||||
from .views import *
|
||||
from .js_views import *
|
||||
|
||||
urlpatterns = [
|
||||
path('articles/', ArticlesPageView, name=u'articles'),
|
||||
path('articles/<int:year>/', ArticlesPageView, name=u'articles_by_year'),
|
||||
path('article/<str:art_url>/', ArticlesOnePageView, name=u'article_one'),
|
||||
path('info_page/<str:page_url>/', UserPageView, name=u'user_page'),
|
||||
|
||||
path('get_articles_block/', get_articles_block_ajax, name='get_articles_block_ajax'),
|
||||
]
|
||||
Reference in New Issue
Block a user