diff options
Diffstat (limited to 'ctrack/users/models.py')
-rw-r--r-- | ctrack/users/models.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ctrack/users/models.py b/ctrack/users/models.py new file mode 100644 index 0000000..8f07b15 --- /dev/null +++ b/ctrack/users/models.py @@ -0,0 +1,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}) |