aboutsummaryrefslogblamecommitdiffstats
path: root/ctrack/users/models.py
blob: 8f07b15a119e450d0ba5f4933e5c1d0a9202aaa9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                          
from django.contrib.auth.models import AbstractUser
from django.db.models import CharField
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _


class User(AbstractUser):

    # First Name and Last Name do not cover name patterns
    # around the globe.
    name = CharField(_("Name of User"), blank=True, max_length=255)

    def get_absolute_url(self):
        return reverse("users:detail", kwargs={"username": self.username})