/usr/lib/python2.7/dist-packages/django_auth_ldap/models.py is in python-django-auth-ldap 1.2.7+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | from django.conf import settings
from django.db import models
# Support for testing Django 1.5's custom user models.
try:
from django.contrib.auth.models import AbstractBaseUser
except ImportError:
from django.contrib.auth.models import User
TestUser = User
else:
class TestUser(AbstractBaseUser):
identifier = models.CharField(max_length=40, unique=True, db_index=True)
USERNAME_FIELD = 'identifier'
def get_full_name(self):
return self.identifier
def get_short_name(self):
return self.identifier
class TestProfile(models.Model):
"""
A user profile model for use by unit tests. This has nothing to do with the
authentication backend itself.
"""
user = models.OneToOneField(settings.AUTH_USER_MODEL)
is_special = models.BooleanField(default=False)
populated = models.BooleanField(default=False)
|