#19736 closed Bug (worksforme)
ViewDoesNotExist exception in views.py
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | HTTP handling | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | rpq@… | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
ViewDoesNotExist exception is being raised even though my view function is correctly placed in the django view (views.py file). Upon further inspection I discovered there was an AttributeError being raised in one of my imported modules (a forms.py call to a missing model form's model). More testing revealed that raising an AttributeError anywhere in the django view *or* in any imported module before the view function that is executed generates a ViewDoesNotExist exception.
Here's my traceback...
Traceback: File "/home/ray/.python-ves/superkids/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 89. response = middleware_method(request) File "/home/ray/.python-ves/superkids/lib/python2.7/site-packages/django/middleware/common.py" in process_request 67. if (not urlresolvers.is_valid_path(request.path_info, urlconf) and File "/home/ray/.python-ves/superkids/lib/python2.7/site-packages/django/core/urlresolvers.py" in is_valid_path 531. resolve(path, urlconf) File "/home/ray/.python-ves/superkids/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve 420. return get_resolver(urlconf).resolve(path) File "/home/ray/.python-ves/superkids/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve 300. sub_match = pattern.resolve(new_path) File "/home/ray/.python-ves/superkids/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve 300. sub_match = pattern.resolve(new_path) File "/home/ray/.python-ves/superkids/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve 209. return ResolverMatch(self.callback, args, kwargs, self.name) File "/home/ray/.python-ves/superkids/lib/python2.7/site-packages/django/core/urlresolvers.py" in callback 216. self._callback = get_callable(self._callback_str) File "/home/ray/.python-ves/superkids/lib/python2.7/site-packages/django/utils/functional.py" in wrapper 27. result = func(*args) File "/home/ray/.python-ves/superkids/lib/python2.7/site-packages/django/core/urlresolvers.py" in get_callable 101. (lookup_view, mod_name))
Change History (3)
follow-up: 2 comment:1 by , 12 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 12 years ago
Cc: | added |
---|
Replying to claudep:
I know this sort of error reporting has been much improved in Django 1.5, please test with a recent Django and reopen if you can still reproduce.
Thanks, I could confirm for you that this particular error reporting issue is fixed in 1.5. You could update the ticket to reflect that if you want.
I know this sort of error reporting has been much improved in Django 1.5, please test with a recent Django and reopen if you can still reproduce.