--- title: "Django" description: "Add Pulse analytics to your Django app. Template-based integration for all Django versions." category: "backend" brandColor: "#092E20" officialUrl: "https://docs.djangoproject.com" relatedIds: ["flask", "laravel", "htmx"] date: "2026-03-28" --- Add the Pulse script to your base template with a debug guard. --- ## Add to your base template Use Django's template tags to only load the script when `DEBUG` is `False`. ```html filename="templates/base.html"
{% if not debug %} {% endif %}