Naming of variables in templates
juandecarrion opened this issue · 3 comments
Hi James,
In https://github.com/jamespacileo/django-pure-pagination/blob/master/pure_pagination/templates/pure_pagination/pagination.html the context variable that contains the Current Page Object is called current_page
While in https://docs.djangoproject.com/en/dev/ref/generic-views/#list-detail-generic-views Django uses the name page_obj
Could you change the name of that variable in your code and templates in order to use the same terminology as in Django? A side effect of this would be that the templates in generic class-based list views would be able to include your template instead of forcing the user to rewrite a new template.
If you need more details, let me know.
Thanks for pointing this out.
I've added page_obj as an alternative, instead of directly substituting current_page. So old custom template code should still work.
I've sent the changes in.
Great, thanks for changing it!
BTW, nice walk-around to keep the backward compatibility :)