text: from django.db import models
  from django.contrib.auth.models import AbstractBaseUser
  from django.contrib.auth.models import PermissionsMixin
  from django.contrib.auth.models import BaseUserManager
  from django.conf import settings
  
  
  class UserProfileManager(BaseUserManager):
      """This is the manager for user profiles"""
      def create_user(self, email, name, password=None):
          """Create a new user profile"""
          if not email:
              raise ValueError('The user must have an email address')
  
          email = self.normalize_email(email)
          user = self.model(email=email, name=name)
  
          """Hashing the passworking should there be any attack"""
          user.set_password(password)
          user.save(using=self._db)
  
          return user
  
      def create_superuser(self, email, name, password):
          """Create and save new superuser with given details"""
          user = self.create_user(email, name , password)
  
          user.is_superuser = True
          user.is_staff = True
          user.save(using=self._db)
  
          return user
  
  
  
  class UserProfile(AbstractBaseUser, PermissionsMixin):
      """This is the model for users in our system"""
      email = models.EmailField(unique=True, max_length=254)
      name = models.CharField(max_length=250)
      is_active = models.BooleanField(default=True)
      is_staff = models.BooleanField(default=False)
  
      objects = UserProfileManager()
  
      """Changing the username field to the email field"""
      USERNAME_FIELD = 'email'
      REQUIRED_FIELDS = ['name']
  
      def get_full_name(self):
          """This will retrieve full name for user"""
          return self.name
  
      def get_short_name(self):
          """This will get the shirt name of the user"""
          return self.name
  
      def __str__(self):
          return self.email
      
  
  class ProfileFeedItem(models.Model):
      """Profile status update"""
      user_profile = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
      status_text = models.CharField(max_length=250)
      created_on = models.DateTimeField(auto_now_add=True)
  
      def __str__(self):
          """Change the text to a string"""
          return self.status_text
  