Sunday, July 8, 2012

Re: Adding a custom validation to Django's auth_user in admin

> Ah. I think the method is overriding the edit page. In other words, you have
> click on the editpage to see the effect of my fail code. So it doesn't
> trigger if you are on the list view page. Does anyone know what to do with
> the editable submission?
> It should use the same clean_ method, shouldn't it??

if you want this validation everywhere you should probably do
something in the model's .save() method, or even better (to avoid
monkey patching) register into the pre_save signal

--
"The whole of Japan is pure invention. There is no such country, there
are no such people" --Oscar Wilde

|_|0|_|
|_|_|0|
|0|0|0|

(\__/)
(='.'=)This is Bunny. Copy and paste bunny
(")_(") to help him gain world domination.

--
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