Skip to content

Instantly share code, notes, and snippets.

@toransahu
Created January 27, 2018 17:56
Show Gist options
  • Save toransahu/676d4a8c29b5cbd7737ff1c0a0b4dfc4 to your computer and use it in GitHub Desktop.
Save toransahu/676d4a8c29b5cbd7737ff1c0a0b4dfc4 to your computer and use it in GitHub Desktop.
Django | Extend User Model | Using a Proxy Model
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