#21912: Improve error message "The view ___ didn't return an HttpResponse 
object."
--------------------------------------+-------------------------
     Reporter:  brycenesbitt          |      Owner:  nobody
         Type:  Cleanup/optimization  |     Status:  new
    Component:  Core (Other)          |    Version:  1.7-alpha-1
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+-------------------------
 The error message "The view _ didn't return an HttpResponse object." in
 base.py leaves
 open the question "What did it return"? This is a proposal to change the
 message to:

 "The view _ returned None: an HttpResponse object was expected."

 The code in question is:



 {{{
               # Complain if the view returned None (a common error).
                 if response is None:
                     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))
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21912>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/055.c1958689001dcc7e0beb18435112b08a%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to