16 October 2009 1 comment Django
This blog post is 13 years old! Most likely, its content is outdated. Especially if it's technical.
In case this bites someone else like it bit more and chewed off many many minutes of debugging time.
If you ever get weird columns in your Django Administration interface, I now know why that happens. See this screenshot example:

This happens when you've defined a TEMPLATE_STRING_IF_INVALID
in your settings.py
. I always put in my local_settings.py
this line:
TEMPLATE_STRING_IF_INVALID = '{{ %s }}'
So that I can quickly see which variable references in template code is potential typos. I'm not a big fan of the implicit magic of equating absence to False/None so I try to avoid the confusion altogether.
- Previous:
- Automatically strip whitespace in Django forms 12 October 2009
- Next:
- What I hate about PIL and Image in Python 19 October 2009
- Related by category:
- How to have default/initial values in a Django form that is bound and rendered 10 January 2020 Django
- Efficient many-to-many field lookup in Django REST Framework 11 April 2018 Django
- Best way to count distinct indexed things in PostgreSQL 21 March 2019 Django
- Simple or fancy UPSERT in PostgreSQL with Django 11 October 2017 Django
- Update to speed comparison for Redis vs PostgreSQL storing blobs of JSON 30 September 2019 Django
- Related by keyword:
- ReCSS a tool to reload the CSS without reloading the whole page 31 January 2006
- Javascript tip: nifty use of the console.log function in Firebug 7 November 2010
- Review: Django 1.1 Testing and Debugging 20 May 2010
Thanks a lot, Peter.
This saves me hours of looking for the mistake ;)
Regards from Hamburg, Germany
Michael