Custom date format stopped working in template

20 views
Skip to first unread message

sandino

unread,
Dec 10, 2015, 8:12:00 AM12/10/15
to Django users
Hello,

I have custom localized data formats ( https://docs.djangoproject.com/en/1.8/topics/i18n/formatting/#creating-custom-format-files ) that I use in my template. After upgrading to 1.8.7 it stopped working (it shows something like 0MarchSunMarchX_th00+0000RUTC_SunAMUTCMarchUTC0MarMarch_March+0000RMarAMUTC). I think it has to do with this fix https://docs.djangoproject.com/en/1.8/releases/1.8.7/#fixed-settings-leak-possibility-in-date-template-filter

My directory structure (there are few other languages besides):

/project
  __init__.py
  /project_app
    __init__.py
    /formats
      __init__.py
      /en
        __init__.py
        formats.py

formats.py:

INDEX_SHORT_DATETIME_FORMAT = 'm/d H:i'

settings.py:

FORMAT_MODULE_PATH = ['myapp.formats']


Is it a bug or my mistake?

Fabio C. Barrionuevo da Luz

unread,
Dec 10, 2015, 8:16:43 AM12/10/15
to django...@googlegroups.com
This is a bug that will be fixed in the next bugfix release django (1.8.8)

https://docs.djangoproject.com/en/1.9/releases/1.8.8/#bugfixes



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/dd554709-8283-4dc9-ae4c-d2168a3096f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Fábio C. Barrionuevo da Luz
Palmas - Tocantins - Brasil - América do Sul


Blog colaborativo sobre Python e tecnologias Relacionadas, mantido totalmente no https://github.com/pythonclub/pythonclub.github.io .

Todos são livres para publicar. É só fazer fork, escrever sua postagem e mandar o pull-request. Leia mais sobre como publicar em README.md e contributing.md.
Regra básica de postagem:
"Você" acha interessante? É útil para "você"? Pode ser utilizado com Python ou é útil para quem usa Python? Está esperando o que? Publica logo, que estou louco para ler...

Reply all
Reply to author
Forward
0 new messages