text: from django.db import models
  from django.contrib.auth.models import (
      BaseUserManager, AbstractBaseUser, PermissionsMixin
  )
  
  
  class MyUserManager(BaseUserManager):
      # def create_user(self, email, date_of_birth, password=None):
      def create_user(self, email, password=None):
          """
          Creates and saves a User with the given email, date of
          birth and password.
          """
          if not email:
              raise ValueError('Users must have an email address')
  
          # user = self.model(
          #     email=self.normalize_email(email),
          #     date_of_birth=date_of_birth,
          # )
          user = self.model(
              email=self.normalize_email(email),
          )
  
          user.set_password(password)
          user.save(using=self._db)
          return user
  
      # def create_superuser(self, email, date_of_birth, password):
      def create_superuser(self, email, password):
          user = self.create_user(
              email,
              password=password)
          user.is_admin = True
          user.is_validated = True
          user.is_active = True
          user.name = 'Administrator'
          user.save(using=self._db)
          return user
  
  
  class MyUser(AbstractBaseUser):
      email = models.EmailField(
          verbose_name='email address',
          max_length=255,
          unique=True,
      )
      name = models.CharField(max_length=200)
      # date_of_birth = models.DateField(null=True, blank=True)
      is_active = models.BooleanField(default=True)
      is_admin = models.BooleanField(default=False)
      is_uploader = models.BooleanField(default=False)
      validate_link = models.CharField(max_length=32, null=True, blank=True)
      validate_expiration = models.DateField(null=True, blank=True)
      is_validated = models.BooleanField(default=False)
      # is_webuser = models.BooleanField(default=False)
  
      objects = MyUserManager()
  
      USERNAME_FIELD = 'email'
      # REQUIRED_FIELDS = ['date_of_birth']
  
      def get_full_name(self):
          # The user is identified by their email address
          return self.email
  
      def get_short_name(self):
          # The user is identified by their email address
          return self.email
  
      def __str__(self):              # __unicode__ on Python 2
          return self.email
  
      def has_perm(self, perm, obj=None):
          "Does the user have a specific permission?"
          # Simplest possible answer: Yes, always
          return True
  
      def has_module_perms(self, app_label):
          "Does the user have permissions to view the app `app_label`?"
          # Simplest possible answer: Yes, always
          return True
  
      @property
      def is_staff(self):
          "Is the user a member of staff?"
          # Simplest possible answer: All admins are staff
          return self.is_admin
  
      class Meta:
          verbose_name_plural = 'Users'