File: models.py

package info (click to toggle)
django-guardian 2.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,664 kB
  • sloc: python: 5,509; makefile: 89; sh: 38
file content (15 lines) | stat: -rw-r--r-- 327 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import datetime

from django.contrib.auth.models import AbstractUser
from django.db import models


class CustomUser(AbstractUser):
    birth_date = models.DateField(null=True, blank=True)


def get_custom_anon_user(User):
    return User(
        username='AnonymousUser',
        birth_date=datetime.date(1410, 7, 15),
    )