referencing the object id from clean validation methods

2009-05-16 Thread simon101
Hi I am using ModelForms to create forms from the models, and using the clean_field and clean methods to validate the fields and form data as a whole. I get the self.cleaned_data[] dictionary which contains all the cleaned up data from the html form, but it doesn't contain the id for the objec

looping through form.errors in templates

2009-05-17 Thread simon101
Hi I've noticed that there have been changes in form error processing for templates when I've been updating some old code to work with django 1.0.2 from 0.96. My code for displaying errors at the top of the pages looked like this in 0.96: {% if form.has_errors %} Please correct the following er

problem with custom validator and booleanfields

2006-09-24 Thread simon101
Hi I have a model with a boolean field which has a custom validator defined in the validator_list parameter. The validator has to run whenever the form is submitted, whether the checkbox is ticked or not. I have set the 'always_test' parameter to true for the validator, but the validator still o

validator_list with checkboxes

2006-09-25 Thread simon101
My first post, so hi everybody. I have a model that has a checkbox field called storage_Required. The field has a custom generator defined in the validator_list parameter. The validator needs to be run whenever the form is submitted, whether the checkbox is ticked or not. Unfortunately the v