Re: Right way to create proxy to User model in Django 1.7

2014-09-17 Thread Collin Anderson
Interesting yeah, why not create a "new" user model inheriting from AbstractBaseUser, and have it _not_ be a proxy model? It should have pretty much the same effect. You may need to say class Meta: db_table = 'auth_user'. -- You received this message because you are subscribed to the Google Gr

Re: Right way to create proxy to User model in Django 1.7

2014-09-15 Thread izabella.gal
Hi Andrew, My custom model looks like this: from django.contrib.auth.models import User class MyUser(User): class Meta: proxy = True def my_custom_method(self): return "Something" This is a proxy class and it's only scope is to extend the User model with a method. And h

Re: Right way to create proxy to User model in Django 1.7

2014-09-15 Thread Andrew Pinkham
Hi Izabella, Could you provide your custom user model declaration? According the the documentation, you should be inheriting from `AbstractBaseUser`. https://docs.djangoproject.com/en/1.7/topics/auth/customizing/#substituting-a-custom-user-model https://docs.djangoproject.com/en/1.7/topics/auth

Re: Right way to create proxy to User model in Django 1.7

2014-09-15 Thread izabella.gal
t; >> Could you, please, help me to find the right way to create proxy to User >> model in Django 1.7? >> >> In 'myapp.models.py' I have a MyUser class which should inherit from the >> user model specified in settings.AUTH_USER_MODEL: >> >> If

Re: Right way to create proxy to User model in Django 1.7

2014-09-13 Thread Daniel Roseman
On Friday, 12 September 2014 19:54:53 UTC+1, Izabella Gál wrote: > > Hi! > > Could you, please, help me to find the right way to create proxy to User > model in Django 1.7? > > In 'myapp.models.py' I have a MyUser class which should inherit from

Right way to create proxy to User model in Django 1.7

2014-09-12 Thread Izabella Gál
Hi! Could you, please, help me to find the right way to create proxy to User model in Django 1.7? In 'myapp.models.py' I have a MyUser class which should inherit from the user model specified in settings.AUTH_USER_MODEL: If I am using the get_user_model() method, I r