#20023: Admin Inline form validation must go in Model.clean()
--------------------------------+------------------------------------------
     Reporter:                  |      Owner:  nobody
  chris.freeman.pdx@…           |     Status:  new
         Type:  Uncategorized   |    Version:  1.5
    Component:  Documentation   |   Keywords:  admin inline form validation
     Severity:  Normal          |  Has patch:  0
 Triage Stage:  Unreviewed      |      UI/UX:  0
Easy pickings:  0               |
--------------------------------+------------------------------------------
 The Django admin site page (./en/1.5/ref/contrib/admin) should mention
 something specific about inline form validation regarding where to put
 clean() code.

 It seems that the only way I was able to clean a field changed as part of
 an admin inline form was in the Model.clean() method.  I could not find a
 place where using clean_myfield() method worked as all for admin inline
 forms.  Note the inline was not part of a formset, as it had a
 OneToOneField relationship to the main form.

 This is not obvious in the documentation as the Model page mentions
 clean() and clean_field() but nothing about inlines.  The documentation on
 Inlines mentions validation, but nothing on putting the code in the
 Model.clean().  Perhaps, also a warning that clean_field() is not run for
 admin inline form updates.

 Please correct me if I'm mistaken about validation of inline forms within
 the Admin interface.

 Regards, Chris

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20023>
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].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to