#33574: SlugField in formfield_overrides
-------------------------------------+-------------------------------------
               Reporter:  Maxim      |          Owner:  nobody
  Danilov                            |
                   Type:  Bug        |         Status:  new
              Component:             |        Version:  4.0
  contrib.admin                      |       Keywords:  admin, modeladmin,
               Severity:  Normal     |  documentation
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 ff overriding not always works in ModelAdmin.
 For example, I want to have a possibility to override form field class,
 like that:
 {{{
 formfield_overrides = { models.SlugField: {'form_class': forms.CharField}
 }
 }}}
 its is not possible, error is "class CharField receive too much arguments
 in init".
 And all Django Fields with additional arguments give us this error,  if
 somebody want to override field_class, like in options.py in
 FORMFIELD_FOR_DBFIELD_DEFAULTS

 I think formfield_overrides was a wrong decision, but we have it already.
 And in Documentation is not deprecated to use "form_class", that's why we
 should to describe about "possible errors after field_class overriding" in
 documentation.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33574>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107017f879d1bb8-e314442e-627d-4531-902a-4ae996bb6e2d-000000%40eu-central-1.amazonses.com.

Reply via email to