Great, thanks. Submitted as https://code.djangoproject.com/ticket/28544#ticket
On Monday, August 28, 2017 at 8:28:40 PM UTC+2, claudep wrote: > > Yes the issue seems legitimate. Please open a report. > https://code.djangoproject.com/newticket > > Claude > > Le 28. 08. 17 à 19:26, Beda Kosata a écrit : > > Hello, > > > > according to the documentation, using {% localize off %} should be > > equivalent to {{ variable|unlocalize }}. However, for datetimes the > > former formats the variable according to DATETIME_FORMAT setting, while > > the latter does not and uses some default ISO based formatting. > > > > I observe this for Django 1.11.4 and thing it is a bug I should report, > > but I would like to have this confirmed. My feeling is that the > > unlocalize filter should be: > > > > | > > @register.filter(is_safe=False) > > defunlocalize(value): > > """ > > Forces a value to be rendered as a non-localized value, > > regardless of the value of ``settings.USE_L10N``. > > """ > > returnforce_text(formats.localize(value,use_l10n=False)) > > | > > > > instead of > > > > | > > @register.filter(is_safe=False) > > defunlocalize(value): > > """ > > Forces a value to be rendered as a non-localized value, > > regardless of the value of ``settings.USE_L10N``. > > """ > > returnforce_text(value) > > | > > > > Could someone with better knowledge of the internals have a look at > this? > > > > Best regards > > > > Beda > > > -- You received this message because you are subscribed to the Google Groups "Django internationalization and localization" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-i18n+unsubscr...@googlegroups.com. To post to this group, send email to django-i18n@googlegroups.com. Visit this group at https://groups.google.com/group/django-i18n. For more options, visit https://groups.google.com/d/optout.