Re: Validators for fields in Proxy Model - possible without monkeypatching?

2012-01-17 Thread Kirill Panshin
I've found the solution, initially I was looking in wrong direction. All I needed to do is to use ``Model.clean()`` method and then call ``Model.full_clean()`` in ``save()``: from django.contrib.auth.models import User class CustomUser(User) def clean(self): """ Clean username field

Re: Validators for fields in Proxy Model - possible without monkeypatching?

2012-01-16 Thread Matt Schinckel
You can probably use a form to do most of what you want, with the caveat that as long as your restrictions are more restrictive than any db constraints that auth.User puts in there are. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view

Validators for fields in Proxy Model - possible without monkeypatching?

2012-01-16 Thread Kirill Panshin
I use proxy model class inherited from `django.contrib.models.User` and I want to apply custom validator to `username` field. Is threre a way to do this without monkeypatching, as I cannot override fields in parent class? -- You received this message because you are subscribed to the Google