Skip to content

Instantly share code, notes, and snippets.

@Pal-Sandeep
Created October 15, 2023 11:07
Show Gist options
  • Save Pal-Sandeep/d34f685aed52ebc28c0dc3bb63b2d757 to your computer and use it in GitHub Desktop.
Save Pal-Sandeep/d34f685aed52ebc28c0dc3bb63b2d757 to your computer and use it in GitHub Desktop.
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager
class CustomUserManager(BaseUserManager):
def create_user(self, email, password=None):
# Your custom logic here
pass
class CustomUser(AbstractBaseUser):
email = models.EmailField(unique=True)
# Your custom fields and methods here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment