Saturday, December 4, 2010

Re: how can I clean a form field before the clean method?

Yes, you have reason. I prefer use something like an "exclude" or
"fields" tuple in the form meta, and set default values in the model
to the fields that I need, but some of the default values are foreign
keys.
I want to do something like:

aaaa.default = MyModel.objects.get(field=True)

and raise an exception if don't find in the table a row with a field =
True, but I don't have idea if something like this can be done.

Thanks for read and sorry for my newbies questions.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate