Opened 17 years ago

Last modified 17 years ago

#4700 closed

urlresolvers.get_callable fails in case of running tests — at Initial Version

Reported by: anonymous Owned by: Adrian Holovaty
Component: Core (Other) Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

urlresolvers.get_callable is raising an exception in "manage.py test" mode for any {% url %} tag:

self.reverse_dict[pattern.callback] = (pattern,)

File "/Users/phausel/site-packages/django/core/urlresolvers.py", line 152, in _get_callback

self._callback = get_callable(self._callback_str)

File "/Users/phausel/site-packages/django/utils/functional.py", line 16, in wrapper

result = func(*args)

File "/Users/phausel/site-packages/django/core/urlresolvers.py", line 29, in get_callable

lookup_view = getattr(import(mod_name, {}, {}, []), func_name)

File "/Users/phausel/site-packages/django/contrib/admin/views/doc.py", line 291, in <module>

'AutoField' : _('Integer'),

TypeError: 'str' object is not callable

(The weird thing is that it occurs only when running the built in test feature.)

I printed out func_name which was template_detail (from django/contrib/admin/views)

Change History (0)

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