Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#33748 closed Bug (fixed)

django.utils.formats.get_format should allow lazy parameter

Reported by: Claude Paroz Owned by: Claude Paroz
Component: Internationalization Version: 4.1
Severity: Release blocker Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Commit [659d2421c7adb] (fixing #20296) triggered a regression when the date template filter (possibly others are affected too) receives a lazy string, like in some_date|date:_('Y-m-d').

This fails with: TypeError: getattr(): attribute name must be string in django.utils.formats.get_format.

Change History (6)

comment:1 by Claude Paroz, 2 years ago

Has patch: set

comment:2 by Carlton Gibson, 2 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Carlton Gibson, 2 years ago

Owner: changed from nobody to Claude Paroz
Status: newassigned

comment:4 by Mariusz Felisiak, 2 years ago

Triage Stage: AcceptedReady for checkin

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

Resolution: fixed
Status: assignedclosed

In 292f3727:

Fixed #33748 -- Fixed date template filter crash with lazy format.

Regression in 659d2421c7adbbcd205604002d521d82d6b0b465.

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

In 000e8e0:

[4.1.x] Fixed #33748 -- Fixed date template filter crash with lazy format.

Regression in 659d2421c7adbbcd205604002d521d82d6b0b465.

Backport of 292f372768836e2aebc713064c5139e8067eebcb from main

Note: See TracTickets for help on using tickets.
Back to Top