Re: Custom clean methods for admin site?

2008-11-07 Thread krase
On 3 Nov., 16:34, Bülent Aldemir <[EMAIL PROTECTED]> wrote: > Create methods with like: > > class MyModel(models.Model): >     mystring = models.CharField(max_length=100) > > class MyForm(forms.ModelForm): >    def clean_mystring(self): >        raise forms.ValidationError('Error Message') > T

Custom clean methods for admin site?

2008-11-03 Thread krase
Hi, i am trying to build an authorisation system for the admin site. The authorisation should not only be based on user, group and type of the object, but also on contents the user just typed in. I assume that i have to override the clean() methods of the ModelAdmin classes. First i tried this: