Opened 13 years ago

Last modified 13 years ago

#17873 closed Bug

django.utils.translation.get_date_formats raises exception — at Version 1

Reported by: Glenn Washburn <development@…> 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 Aymeric Augustin)

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'

Change History (1)

comment:1 by Aymeric Augustin, 13 years ago

Description: modified (diff)

Fixed formatting -- please use "Preview".

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