Note that there are some explanatory texts on larger screens.

plurals
  1. POdjango-endless-pagination twitter-style
    primarykey
    data
    text
    <p>I'm trying to implement django-endless pagination on my project. Simple pagination works (with "show more" ) but twitter style (ajax based) is giving me troubles.</p> <p>This is my view:</p> <pre><code>@page_template('userena/profil_page.html') # just add this decorator def public_details(request, username=None, template = 'userena/profil.html', extra_context=None): user = get_object_or_404(get_user_model(), username__iexact=username) userObjekat = User.objects.get(username=username) user_profil = userObjekat.get_profile() context = { 'projekti': user_profil.projekat_set.all(), } if extra_context is not None: context.update(extra_context) return userena_views.profile_detail(request, extra_context=context, username=username, template_name='userena/profil.html') </code></pre> <p>As suggested, my templates are broken down into 2 pieces, "main" one and AJAX one. This is a part of the main template, which loads the _page template:</p> <pre><code>&lt;/li&gt; {% include page_template %} &lt;/li&gt; </code></pre> <p>and _page template GETS INCLUDED - I can see the content.</p> <p>_page template:</p> <pre><code>{% load endless %} &lt;li id="projektiTab"&gt; &lt;div class="ten columns"&gt; &lt;ul class="accordion"&gt; {% paginate projekti %} {% for projekat in projekti %} &lt;li&gt; &lt;div class="title"&gt; &lt;h6&gt; {{ projekat.naziv }}&lt;/h6&gt; &lt;/div&gt; &lt;div class="content"&gt; &lt;p&gt;{{ projekat.opis }}&lt;/p&gt; &lt;/div&gt; &lt;/li&gt; {% endfor %} {% show_more %} &lt;li&gt; &lt;/div&gt; &lt;/li&gt; </code></pre> <p>Javascripts get loaded also ( STATIC_URL is working ) and in the page source I use:</p> <pre><code>&lt;script src="/static/js/endless-pagination.js"&gt;&lt;/script&gt; &lt;script&gt; $.endlessPaginate({ paginateOnScroll: true, paginateOnScrollChunkSize: 5 }); &lt;/script&gt; </code></pre> <p>After all this, pagination by scroll is not working. What am I doing wrong?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload