#22510: Form fields cannot have names that are present as attributes on the form
---------------------------------+--------------------------------------
     Reporter:  gc@…             |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  Documentation    |                  Version:  1.7-beta-2
     Severity:  Release blocker  |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  1                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------
Changes (by mjtamlyn):

 * component:  Forms => Documentation


Comment:

 I am strongly in favour of loic's option number 1 - change no code and
 document the problems with naming fields after things which would be on
 the form anyway. In the spirit of the fix for #8620 (making forms behave
 more like "normal" python objects), this makes sense anyway.

 As a side note, it would be much more incompatible (but imo better) to not
 remove the field definitions from the form object at all - i.e.
 `MyForm().foo == MyForm['foo']`. This may have serious implications for
 the use of forms in DTL though. However, it would potentially give us the
 option of using the metaclass simply to define fields after the class is
 resolved normally by python. This is likely a step too far.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/22510#comment:9>
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/071.fce9162b44ff2cc925d1b19d385fb593%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to