Opened 14 years ago
Closed 14 years ago
#17873 closed Bug (fixed)
django.utils.translation.get_date_formats raises exception
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | Translations | Version: | 1.4-beta-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 (last modified by )
Because django.utils.translation.get_date_formats just proxies to either the null or real translation functions, those functions sets must have get_date_formats as a member. Neither have it.
>>> from django.utils.translation import ugettext, get_date_formats
>>> get_date_formats()
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/virtenv/src/django/django/utils/translation/__init__.py", line 136, in get_date_formats
return _trans.get_date_formats()
File "/virtenv/src/django/django/utils/translation/__init__.py", line 67, in __getattr__
setattr(self, real_name, getattr(trans, real_name))
AttributeError: 'module' object has no attribute 'get_date_formats'
Attachments (1)
Change History (5)
comment:1 by , 14 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 14 years ago
| Has patch: | set |
|---|---|
| Severity: | Normal → Release blocker |
| Triage Stage: | Unreviewed → Accepted |
The same problem exists with get_partial_date_formats.
These functions are removed in 1.4 -- see the deprecation timeline -- but the references in __init__ were missed in r15987.
Patch attached.
by , 14 years ago
| Attachment: | 17873.diff added |
|---|
comment:3 by , 14 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Note:
See TracTickets
for help on using tickets.
Fixed formatting -- please use "Preview".