I have successfully configured L10N on my project, and I can translate the dates into the correct format. But now I need SHORT_DATE_FORMAT for the current locale on my templates or in the context of SHORT_DATE_FORMAT .
Getting from django.conf.settings always gives me the default value, m/d/Y The locale is currently set to pt_BR , so the format should be d/m/Y
In [42]: settings.LANGUAGE_CODE Out[42]: 'pt-br' In [43]: settings.USE_L10N Out[43]: True In [44]: settings.SHORT_DATE_FORMAT Out[44]: 'm/d/Y'
Any clues?
By the way, I'm really trying to do this: get the current locale format so that I can pass it to the bootstrap-datepicker plugin. It currently uses m/d/Y , and django indicates the date in d/m/Y format.
source share