text: from django.db import models
  from django.contrib.auth.models import AbstractBaseUser, BaseUserManager
  
  # Create your models here.
  class MyUserManager(BaseUserManager):
      def create_user(self, email, password=None):
          if not email:
              raise ValueError('Users must have an email address')
          user = self.model(
              email=self.normalize_email(email),
          )
          user.set_password(password)
          user.save(using=self._db)
          return user
      def create_superuser(self, email, password):
          user = self.create_user(
              email,
              password=password,
          )
          user.is_admin = True
          user.save(using=self._db)
          return user
  
  class MyUser(AbstractBaseUser):
      email = models.EmailField(unique=True)
      avatar = models.ImageField(blank=True)
      kudos_points = models.PositiveIntegerField(default=0)
      is_admin = models.BooleanField(default=False)
      is_active = models.BooleanField(default=True)
      activation_key = models.CharField(max_length=16,editable=False,blank=True)
      key_expiration = models.DateTimeField(editable=False,null=True)
      objects=MyUserManager()
      USERNAME_FIELD = 'email'
      def __str__(self):
          return self.email
      def get_full_name(self):
          return self.email
      def get_short_name(self):
          return self.email
      def has_perm(self,perm,obj=None):
          return True
      def has_module_perms(self,app_label):
          return True
      @property
      def is_staff(self):
          return self.is_admin
      def set_activation(self,key,expiration):
          self.activation_key=key
          self.key_expiration=expiration
  