My django app uses mixture of python's native datetime.datetime.strftime
and django's date:
filters.
Now, I can change the locale very easily in django using settings.py
, but not so easily with python, because I would need to invoke locale.setlocale(locale.LC_ALL, '')
somewhere during app startup.
Where should I put this code as it need to be invoked once during startup of django app.
AND is there any better way to handle such situation?
P.S. I cannot do away with using python's native strftime
because I need to serialize datetime
object somehow.