#30404: "Using a model formset in a view" example doesn't handle invalid 
formset.
-------------------------------------+-------------------------------------
     Reporter:  Stephen G Tuggy      |                    Owner:  nobody
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Documentation        |                  Version:  master
     Severity:  Normal               |               Resolution:
                                     |  worksforme
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by felixxm):

 * status:  new => closed
 * resolution:   => worksforme
 * type:  Bug => Cleanup/optimization


Comment:

 Thanks for the report, however this code works for me. Please notice that
 `return` is outside `if ... else` block, so it is called even when form is
 invalid:
 {{{ #!python
 if request.method == 'POST':
     ...
 else:
     ...
 return render(request, 'manage_authors.html', {'formset': formset})
 }}}
 Maybe some indentation issue?

 Please use one of
 [https://code.djangoproject.com/wiki/TicketClosingReasons/UseSupportChannels
 support channels].

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30404#comment:1>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.0a641be61e375d4e2ba718a7573bebea%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to