is_active.py 431 B

123456789101112131415
  1. from django.contrib.auth.models import AbstractBaseUser, BaseUserManager
  2. from django.db import models
  3. class IsActiveTestUser1(AbstractBaseUser):
  4. """
  5. This test user class and derivatives test the default is_active behavior
  6. """
  7. username = models.CharField(max_length=30, unique=True)
  8. custom_objects = BaseUserManager()
  9. USERNAME_FIELD = 'username'
  10. # the is_active attr is provided by AbstractBaseUser