Skip to content
Snippets Groups Projects
Unverified Commit 8bc3345c authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Add basic person data model fields.

parent f1314dba
No related branches found
No related tags found
No related merge requests found
from django.contrib.auth.models import AbstractUser
from django.db import models
from django.utils.translation import gettext_lazy as _
SEX_CHOICES = [
('f', _('female')),
('m', _('male'))
]
class Person(AbstractUser):
additional_name = models.CharField(max_length=30)
street = models.CharField(max_length=30)
housenumber = models.CharField(max_length=10)
postal_code = models.CharField(max_length=5)
place = models.CharField(max_length=30)
phone_number = models.CharField(max_length=30)
mobile_number = models.CharField(max_length=30)
date_of_birth = models.DateField()
sex = models.CharField(max_length=1, choices=SEX_CHOICES)
photo = models.ImageField()
import_ref = models.CharField(max_length=64)
def __str__(self):
return '%s, %s' % (self.last_name, self.first_name)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment