#17428: Admin formfield validation uses form model instead of registered model
-------------------------------+------------------------------------
     Reporter:  ungenio        |                    Owner:  dante87
         Type:  Bug            |                   Status:  assigned
    Component:  contrib.admin  |                  Version:  1.3
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  1              |                    UI/UX:  0
-------------------------------+------------------------------------

Comment (by per856):

 I submitted a fix for this in https://github.com/django/django/pull/528

 It is my first contribution, so it probably has lots of problems.

 My fix is this(see github for details and unit test):
 {{{
 def check_formfield(cls, model, opts, label, field):
     form = modelform_factory(model, form=cls.form)
     try:
         form.base_fields[field]
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17428#comment:3>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to