Ensuring a block is overridden in a Django template (via) Neat Django trick by Tom Carrick: implement a Django template tag that raises a custom exception, then you can use this pattern in your templates:
{% block title %}{% ensure_overridden %}{% endblock %}
To ensure you don't accidentally extend a base template but forget to fill out a critical block.
Recent articles
- NotebookLM's automatically generated podcasts are surprisingly effective - 29th September 2024
- Themes from DjangoCon US 2024 - 27th September 2024
- DJP: A plugin system for Django - 25th September 2024