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

2012-07-08 Thread Tomas Neme
> 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, sho

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

2012-07-08 Thread dd
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

Adding a custom validation to Django's auth_user in admin

2012-07-08 Thread dd
Django has list_editable. I need to edit is_active flag. class MyUserAdminForm(ModelForm): class Meta: model = User def clean_is_active(self): # do something that validates your data print ' I am here... ' print self.cleaned_data print self cla

Adding a custom validation to Django's auth_user in admin

2012-07-08 Thread John Yeukhon Wong
Django has list_editable. I need to edit is_active flag. class MyUserAdminForm(ModelForm): class Meta: model = User def clean_is_active(self): # do something that validates your data print ' I am here... ' print self.cleaned_data print self cla