File: models.py

package info (click to toggle)
django-webtest 1.9.13-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 268 kB
  • sloc: python: 1,115; sh: 16; makefile: 8
file content (17 lines) | stat: -rw-r--r-- 400 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import django

if django.VERSION >= (1, 5):
    from django.contrib.auth.models import AbstractBaseUser
    from django.db import models


    class MyCustomUser(AbstractBaseUser):
        email = models.EmailField(
            max_length=255,
            unique=True,
            db_index=True,
        )
        USERNAME_FIELD = 'email'

        class Meta:
            app_label = "testapp_tests"