#25812: Cannot use custom formats after security fix in 1.8.7 (regression)
-------------------------------------+-------------------------------------
     Reporter:  Gagaro               |                    Owner:  Gagaro
         Type:  Uncategorized        |                   Status:  assigned
    Component:                       |                  Version:  1.8
  Internationalization               |
     Severity:  Normal               |               Resolution:
     Keywords:  formats              |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by Gagaro:

Old description:

> Before the security fix in 1.8.7, we could have custom formats in
> formats.py files and used them. For example, if I have the following
> formats.py:
>

> {{{
> CUSTOM_DAY_FORMAT = 'd/m/Y CUSTOM'
> }}}
>
> I could used it:
>
> {{{
> >>> get_format('CUSTOM_DAY_FORMAT')
> 'd/m/Y CUSTOM'
> }}}
>
> But now it returns 'CUSTOM_DAY_FORMAT' instead. I know where the problem
> is and how to fix it, I should have a PR ready in a few hours with a test
> and the fix.

New description:

 Before the security fix in 1.8.7, we could have custom formats in
 formats.py files and used them. For example, if I have the following
 formats.py:


 {{{
 CUSTOM_DAY_FORMAT = 'd/m/Y CUSTOM'
 }}}

 I could used it:

 {{{
 >>> get_format('CUSTOM_DAY_FORMAT')
 'd/m/Y CUSTOM'
 }}}

 But now it returns 'CUSTOM_DAY_FORMAT' instead.

 https://github.com/django/django/pull/5719

--

--
Ticket URL: <https://code.djangoproject.com/ticket/25812#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.fe10b5aa0fac7062c7f48d028e2c1a36%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to