[Django] #29267: Refactor ModelForm to support separate fields

5 views
Skip to first unread message

Django

unread,
Mar 27, 2018, 6:40:40 PM3/27/18
to django-...@googlegroups.com
#29267: Refactor ModelForm to support separate fields
-----------------------------------------+------------------------
Reporter: Victor Porton | Owner: nobody
Type: New feature | Status: new
Component: Forms | Version: 2.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
Now I am designing a form based on two models. I cannot use `ModelForm`,
because I need to support "splitting" data into two models and versioning
of one of these models.

So I manually create form fields based on model fields (repeating such
arguments as `max_length`, what is against DRY).

I want given a model field to create its corresponding form field
automatically (like to what `ModelForm` does, but for individual fields
rather than for the entire model).

So, please factor `ModelForm` into smaller parts to support such usage.

--
Ticket URL: <https://code.djangoproject.com/ticket/29267>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 28, 2018, 9:47:05 AM3/28/18
to django-...@googlegroups.com
#29267: Refactor ModelForm to support separate fields
-------------------------------+--------------------------------------

Reporter: Victor Porton | Owner: nobody
Type: New feature | Status: closed
Component: Forms | Version: 2.0
Severity: Normal | Resolution: wontfix

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 Jani Tiainen):

* status: new => closed
* resolution: => wontfix


Comment:

Nothing prevents you to use even multiple modelforms within single HTML
form.

If you need help with using Django in such a case, either consult #django
IRC channel on Freenode or Django user group on google groups.

Closing as won't fix.

--
Ticket URL: <https://code.djangoproject.com/ticket/29267#comment:1>

Reply all
Reply to author
Forward
0 new messages