Opened 15 years ago
Closed 15 years ago
#11701 closed (fixed)
[patch] DateInput widget: allow uggettext_lazy in format attr
Reported by: | carsten | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | 1.1 |
Severity: | Keywords: | ||
Cc: | carsten.kraus@…, hr.bjarni+django@… | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Currently the following raises "TemplateSyntaxError 'strftime() argument 1 must be string or
read-only buffer, not __ proxy__ ":
some_date = fields.DateField(widget=widgets.DateInput(format=ugettext_lazy('%d.%m.%Y')))
The attached patch fixes DateWidget by using force_unicode() on self.format in the date.strftime() method.
Attachments (1)
Change History (3)
by , 15 years ago
Attachment: | dateinput_ugettext_enabled.diff added |
---|
comment:1 by , 15 years ago
Cc: | added |
---|
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Fixed in [12029]