Common web features in Django

Follow me for more content or contact for work opportunities:
Twitter / LinkedIn

Here is a brief list of common web features, and the best way I know for achieving it in Django:
-

  • Breadcrumbs: use {{ block.super }} for recursive link inheritance [more info]

  • Back button: use {{ request.META.HTTP_REFERER }} for linking to referring URL

  • Highlight active menu option: use {{ request.path }} to know requested URL and compare it with menu options * [more info]

  • Pagination: use 'django.views.generic.list_detail.object_list' generic view [more info]


  • it's needed to add 'request' module to TEMPLATE_CONTEXT_PROCESSORS on settings.py

    Follow me for more content or contact for work opportunities:
    Twitter / LinkedIn