The problem is the default User model does not have some very useful options given to the fields e.g unique=True to the email field.
I read this question: http://stackoverflow.com/questions/1817244/django-override-default-user-model-method, and checked Proxy Model concept, but with no effect.
At first I tried:
from django.contrib.auth import models
class User(models.User):
class Meta:
proxy = True
email = EmailField('e-mail address', unique=True, blank=False)
which resulted in:
django.core.exceptions.FieldError: Proxy model 'User' contains model fields.
so next was:
from django.contrib.auth import models
class User(models.User):
class Meta:
proxy = True
models.User.email = EmailField('e-mail address', unique=True, blank=False)
and this "solution" has no effect at all. Default User model was behaving the same as before.
I am interested in non-monkey-patching-solution only.
Edit: Ok. Monkey-patching is acceptable for me, but how make this reasonably? (I mean not changing the file that lies in /usr/pyshared/python2.6/...
)