ajax - How to implement infinite scroll, endless pagination using the zinnia blog app from Django -
this first question here
i want implement infinite scrolling (or endless pagination ) on blog powered zinnia app django.
my blog construction same zinnia blog, haven't coded different it. tried using "django endless pagination" because it's documentation says can create twitter style pagination couldn't resolve set it's snippets of code.
i don't mind if can solved using django endless pagination or not.
my pip freeze looks this:
django==1.5.1 pillow==2.3.1 argparse==1.2.1 beautifulsoup4==4.3.2 django-blog-zinnia==0.13 django-endless-pagination==2.0 django-filebrowser==3.5.6 django-grappelli==2.4.10 django-mptt==0.6.0 django-tagging==0.3.2 django-tinymce==1.5.2 django-xmlrpc==0.1.5 easy-thumbnails==1.3 feedparser==5.1.3 pyparsing==2.0.1 pytz==2014.2 raven==4.2.1 wsgiref==0.1.2
i appreciate suggestions.
p.d: allow me know if need else give appropriate answer
you can in client side, using library : https://github.com/paulirish/infinite-scroll
works fine on http://fantomas.willbreak.it/ this:
$(document).ready(function () { $('.hfeed').infinitescroll({ navselector: '.paginator', nextselector: '.paginator .next a', itemselector: '.hentry', contentselector: '.hfeed aside', bufferpx: 1000, maxpage: 5, loading: { msgtext: '<p>chargement des articles suivants...</p>', finishedmsg: '', img: '/static/img/loader.gif', }, }, function (newelements) { $(newelements).find('pre').each(function (i, e) { hljs.highlightblock(e) }); }); });
ajax django pagination infinite-scroll zinnia
No comments:
Post a Comment