Created
January 27, 2018 17:56
-
-
Save toransahu/676d4a8c29b5cbd7737ff1c0a0b4dfc4 to your computer and use it in GitHub Desktop.
Django | Extend User Model | Using a Proxy Model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.auth.models import User | |
from .managers import PersonManager | |
class Person(User): | |
objects = PersonManager() | |
class Meta: | |
proxy = True | |
ordering = ('first_name', ) | |
def do_something(self): | |
# do something | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment