#17873: django.utils.translation.get_date_formats raises exception
-------------------------------------+-------------------------------------
Reporter: Glenn Washburn | Owner: nobody
<development@…> | Status: new
Type: Bug | Version:
Component: Translations | 1.4-beta-1
Severity: Normal | Resolution:
Keywords: | Triage Stage:
Has patch: 0 | Unreviewed
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):
* needs_docs: => 0
* needs_tests: => 0
* needs_better_patch: => 0
Old description:
> 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'
New description:
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'
}}}
--
Comment:
Fixed formatting -- please use "Preview".
--
Ticket URL: <https://code.djangoproject.com/ticket/17873#comment:1>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.