django-validation
Delete link disappears in Django admin inline formset if ValidationError raised
I have a form with KeywordInline. When I add new object using the form inlined formset has a js-link to add new form into formset. Newly added forms have a js-enabled delete button (x mark on the righ[详细]
2023-04-07 06:43 分类:问答Django form.is_valid keeps throwing KeyError
I have this code in my view: def add_intern(request): if request.method == \'POST\': form = InternApplicationForm(request.POST)[详细]
2023-04-05 22:03 分类:问答Loop detection in django models
I have an model which has a many to many relationship with itself. I want to create a validation on the model(s) which would prevent a group from being it\'s own subgroup, or a subgroup of it\'s subg[详细]
2023-03-24 14:17 分类:问答django - disable field validaton in form
I need to disable field validation in ModelForm. I want this validation not to validate some field. I have some situations (AJAX rendering form) when I want to return more complex form with additional[详细]
2023-03-21 11:30 分类:问答How can I get the temporary name of an UploadedFile in Django?
I\'m doing some file validation and want to load an UploadedFile into an external library while it is in the开发者_如何学编程 \'/tmp\' directory before I save it somewhere that it can be executed. Dja[详细]
2023-03-19 13:51 分类:问答Help with validation in Models and Forms
I have a few questions about validation in Models and Forms. Could you help me out with these: Where should validation be done? Should it be in the Model or the Form? Is the right way to go about t[详细]
2023-03-16 13:04 分类:问答Django--Form validation (Why can't I manually clean an Integer Form Field)
This should be pretty straightforward but I\'m not figuring it out from the Django documentation.I have an IntegerField Model Field from which I\'ve created a ModelForm Field.The field开发者_如何学C i[详细]
2023-03-14 08:31 分类:问答Why is my custom validation not being called?
I have this model and modelform: class Comment(models.Model): text = models.CharField(max_length=100) def clean_text(self):[详细]
2023-03-13 07:24 分类:问答What to return after a django form has failed validation?
How shall I return to my page after a django form has failed validation? This is what I have at the moment, I return a render_to_response after it has failed with my form objects and all the other ob[详细]
2023-03-09 02:40 分类:问答Django problem with validating forms
I have been trying to figure out how all this validation works, but I am not getting the hang of it. I read the very few examples on djangoproject, but I am missing concepts and how everything is tied[详细]
2023-03-03 19:22 分类:问答