Common web features in Django

You can connect with me on LinkedIn to discuss collaborations and work opportunities.

You can also follow me on Twitter, Bluesky and Mastodon.

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

    You can connect with me on LinkedIn to discuss collaborations and work opportunities.

    You can also follow me on Twitter, Bluesky and Mastodon.