1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #21912 -- Improved error message if a view returns None.

Thanks brycenesbitt for the report.
This commit is contained in:
Aaron France
2014-02-15 15:55:50 +01:00
committed by Tim Graham
parent d97bf2e9c8
commit 1150053b99
2 changed files with 6 additions and 5 deletions

View File

@@ -128,7 +128,8 @@ class BaseHandler(object):
view_name = callback.__name__
else: # CBV
view_name = callback.__class__.__name__ + '.__call__'
raise ValueError("The view %s.%s didn't return an HttpResponse object." % (callback.__module__, view_name))
raise ValueError("The view %s.%s didn't return an HttpResponse object. It returned None instead."
% (callback.__module__, view_name))
# If the response supports deferred rendering, apply template
# response middleware and then render the response