Loading django/core/handlers/base.py +5 −4 Original line number Diff line number Diff line from __future__ import unicode_literals import sys import types from django import http from django.core import signals Loading Loading @@ -125,10 +126,10 @@ class BaseHandler(object): # Complain if the view returned None (a common error). if response is None: try: view_name = callback.func_name # If it's a function except AttributeError: view_name = callback.__class__.__name__ + '.__call__' # If it's a class if isinstance(callback, types.FunctionType): # FBV 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)) # If the response supports deferred rendering, apply template Loading Loading
django/core/handlers/base.py +5 −4 Original line number Diff line number Diff line from __future__ import unicode_literals import sys import types from django import http from django.core import signals Loading Loading @@ -125,10 +126,10 @@ class BaseHandler(object): # Complain if the view returned None (a common error). if response is None: try: view_name = callback.func_name # If it's a function except AttributeError: view_name = callback.__class__.__name__ + '.__call__' # If it's a class if isinstance(callback, types.FunctionType): # FBV 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)) # If the response supports deferred rendering, apply template Loading