django-forms
Overriding __init__ for a form and setting the checkbox disabled and using initial=True
I have a form where I am overriding the init so I can set some checkboxes to be disabled, these disabled checkboxes are pre-checked.[详细]
2023-03-31 00:12 分类:问答Django, form in menu and form in view conflicting
I want to put a form in my menu to be able to choose a project, keep this information and be able to change it at all time in the site. I\'m using a context_processor to implement it and (trying to) u[详细]
2023-03-30 22:15 分类:问答Django models problem
I have a big proble. I implemented a form which holds various fields, among which EmailFIeld must be OPTIONAL.[详细]
2023-03-30 20:05 分类:问答How to recover ImageField value in Django when it returns an Error?
I have a form which contains an imagefield and some other fields. my view looks like this: def post_view(request):[详细]
2023-03-30 05:43 分类:问答How to modify form choices from class?
I have form class: class Form(forms.ModelForm): id = forms.ModelChoiceField(queryset=Option.objects.all(), widget=forms.HiddenInput())[详细]
2023-03-30 05:09 分类:问答Creating a ModelForm where my primary key field generates a select box
I am not sure if my language clear enough but basically I have this form: class Paper(models.Model): number = models.CharField(max_length=12,primary_key=True)[详细]
2023-03-30 03:50 分类:问答Django Model Formset Only first form required
In a modelformset with 3 copies 开发者_运维问答of the form, how do i specify that only the first set is required but the rest can be blank or null?I\'ve used something like this for inline formsets:[详细]
2023-03-29 23:39 分类:问答django ajax/jquery file upload
I am trying to replicate the example given by Alex Kuhl on his excellent post: http://kuhlit.blogspot.com/2011/04/ajax-file-uploads-and-csrf-in-django-13.html[详细]
2023-03-29 23:38 分类:问答UnboundLocalError- local variable referenced before assignment - Django [duplicate]
This question already has answers here: How can a name be "unbound&quo开发者_如何学编程t; in Python? What code can cause an `UnboundLocalError`?[详细]
2023-03-29 16:40 分类:问答Creating a custom list/dictionary of BoundFields for a django Form (emulating form.hidden_fields)
Okay, I have a somewhat complicated form with a lot of complicated business logic, and as a result I\'m actually generating fields on the fly when the form is created. I need to be able to access the[详细]
2023-03-29 14:35 分类:问答