modelform
Django "Duplicate" ModelForm
I\'m wondering if there is a simple way of creating a \"duplicate\" ModelForm in Django - i.e. a form that is prefilled with the content of an existing model instance (excepting ce开发者_运维技巧rtain[详细]
2023-01-14 00:09 分类:问答How can I exclude a declared field in ModelForm in form's subclass?
In Django, I am trying to derive (subclass) a new form from ModelForm form where I would like to remove some fields (or to have only some fields, to be more correct). Of course obvious way would be to[详细]
2023-01-07 20:27 分类:问答get_model equivalent for ModelForms?
I have a multiple Model开发者_如何转开发Form classes that each represent a different Model. I would like to have a generic \'create\' function that loads the specified model form based on a URL parame[详细]
2023-01-07 11:57 分类:问答How do I create a Django ModelForm, so that it's fields are sometimes required, sometimes not?
Ok, here is the question. Imagine I have a ModelForm which have only two fields. like this one: class ColorForm(forms.Form):[详细]
2023-01-02 08:18 分类:问答django forms from two tables referencial integrity
i have a class named cv,and a class named universit开发者_高级运维y, and each user that completes his cv, should choose a University he studyes at.[详细]
2022-12-31 12:23 分类:问答Removing a fields from a dynamic ModelForm
In a ModelForm, i have to test user permissions to let them filling the right fields : It is defined like this:[详细]
2022-12-24 11:01 分类:问答After extending the User model in django, how do you create a ModelForm?
I extended the User model in django to include several other variables, such as location, and employer. Now I\'m trying to create a form that has the following fields:[详细]
2022-12-24 05:42 分类:问答modelform "object not callable" error
Ok, so I\'m fairly new to Django, but have been reading both the online django book and the djangoproject documentation, but I can\'t seem to figure this error out:[详细]
2022-12-23 05:48 分类:问答ModelForm save fails
I am trying to save a modelform that represents a bank account but I keep getting a ValueError even though the form appears to validate. The models I have to use are:[详细]
2022-12-12 01:50 分类:问答