Answer the question
In order to leave comments, you need to log in
How to fix scrolling error in django-el-pagination app?
Hello, help me solve the problem.
I'm using infinite scroll in django-el-pagination app .
When the user reaches the last page in the terminal, an error appears:
Time: [25/Jan/2018 08:37:38] | LevelName: DEBUG | Module: base | Process: 1148 | Thread: 123145435922432 | Message: Exception while resolving variable 'querystring' in template 'documents/documents.html'.
Traceback (most recent call last):
File "/Users/nurzhan_nogerbek/Virtualenvs/py2714/lib/python2.7/site-packages/django/template/base.py", line 903, in _resolve_lookup
(bit, current)) # missing attribute
VariableDoesNotExist: Failed lookup for key [querystring] in u"[{'False': False, 'None': None, 'True': True}, {'csrf_token': <SimpleLazyObject: <function _get_val at 0x109034ed8>>}]
from el_pagination.views import AjaxListView
class DocumentListView(AjaxListView):
context_object_name = 'documents'
template_name = "documents/main.html"
page_template = 'documents/documents.html'
def get_queryset(self):
documents = Document.objects.all()
return documents
<div class="list-group">
{% include page_template %}
</div>
{% load el_pagination_tags %}
{% paginate 20 documents %}
{% for document in documents %}
{% include "documents/list_template.html" %}
{% endfor %}
{% show_more %}
<div class="list-group-item">{{document.title}}</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question