# Path: sectesting/streetart/models/base.py
# class BaseStreetArtModel(models.Model):
#     """
#     This is a base model for all models used by the Street Art project.
#     """
# 
#     uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
#     created = models.DateTimeField(auto_now_add=True)
# 
#     class Meta:
#         ordering = ("created",)
#         abstract = True
# 
#     def __repr__(self):
#         return "<%s - %s>" % (self.__class__.__name__, self.uuid)


from django.contrib.auth.models import AbstractBaseUser
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import PermissionsMixin
from django.core.mail import send_mail
from django.contrib.auth.base_user import BaseUserManager
from .base import BaseStreetArtModel
        user.set_password(password)
        user.save(using=self._db)
        return user

    def create_user(self, email, password=None, **extra_fields):
        """
        Create and save a regular user based on the given email and password.
        :param email: The email to assign the user.
        :param password: The password to assign the user.
        :param extra_fields: Extra fields to attribute to the user.
        :return: The created user object.
        """
        extra_fields.setdefault("is_superuser", False)
        return self._create_user(email, password, **extra_fields)

    def create_superuser(self, email, password, **extra_fields):
        """
        Create and save a super user based on the given email and password.
        :param email: The email to assign the user.
        :param password: The password to assign the user.
        :param extra_fields: Extra fields to attribute to the user.
        :return: The created user object.
        """
        extra_fields.setdefault("is_superuser", True)
        extra_fields.setdefault("is_staff", True)
        if extra_fields.get("is_superuser") is not True:
            raise ValueError("Superuser must have is_superuser=True.")
        return self._create_user(email, password, **extra_fields)



# Path: sectesting/streetart/models/base.py
# class BaseStreetArtModel(models.Model):
#     """
#     This is a base model for all models used by the Street Art project.
#     """
# 
#     uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
#     created = models.DateTimeField(auto_now_add=True)
# 
#     class Meta:
#         ordering = ("created",)
#         abstract = True
# 
#     def __repr__(self):
#         return "<%s - %s>" % (self.__class__.__name__, self.uuid)


# Path: sectesting/streetart/models/user.py
from django.contrib.auth.models import AbstractBaseUser
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import PermissionsMixin
from django.core.mail import send_mail
from django.contrib.auth.base_user import BaseUserManager
from .base import BaseStreetArtModel

        user.set_password(password)
        user.save(using=self._db)
        return user

    def create_user(self, email, password=None, **extra_fields):
        """
        Create and save a regular user based on the given email and password.
        :param email: The email to assign the user.
        :param password: The password to assign the user.
        :param extra_fields: Extra fields to attribute to the user.
        :return: The created user object.
        """
        extra_fields.setdefault("is_superuser", False)
        return self._create_user(email, password, **extra_fields)

    def create_superuser(self, email, password, **extra_fields):
        """
        Create and save a super user based on the given email and password.
        :param email: The email to assign the user.
        :param password: The password to assign the user.
        :param extra_fields: Extra fields to attribute to the user.
        :return: The created user object.
        """
        extra_fields.setdefault("is_superuser", True)
        extra_fields.setdefault("is_staff", True)
        if extra_fields.get("is_superuser") is not True:
            raise ValueError("Superuser must have is_superuser=True.")
        return self._create_user(email, password, **extra_fields)



class StreetArtUser(AbstractBaseUser, PermissionsMixin, BaseStreetArtModel):