[Fixed]-Django i18n's makemessages doesn't find .djhtml and .djt templates

1👍

I found the answer looking through Django’s code.

You can use the -e or --extension to select which file extensions it’s supposed to check.

From their own code, this flag determines:

The file extension(s) to examine (default: “html,txt,py”, or “js” if
the domain is “djangojs”). Separate multiple extensions with commas,
or use -e multiple times.

So you can use it like so to detect djhtml and djt:

python manage.py makemessages -e 'html,txt,py,djt,djhtml'
👤Fabio

Leave a comment