server/authentication/models.py
changeset 103 b707607e8a38
parent 63 bd7bcfc86232
child 108 4a152f5f4a09
equal deleted inserted replaced
102:622f5d1955b6 103:b707607e8a38
     1 
     1 
     2 from django.contrib.auth.models import AbstractUser
     2 from django.contrib.auth.models import AbstractUser
     3 from django.db import models
     3 from django.db import models
       
     4 
       
     5 import settings
     4 
     6 
     5 
     7 
     6 class AmmicoUser(AbstractUser):
     8 class AmmicoUser(AbstractUser):
     7     idUser = models.CharField(max_length=50, blank=True)
     9     idUser = models.CharField(max_length=50, blank=True)
     8     
    10     
     9 class Profile(models.Model):
    11 class Profile(models.Model):
    10     user = models.OneToOneField(AmmicoUser)
    12     user = models.OneToOneField(settings.AUTH_USER_MODEL)
    11     image = models.URLField(max_length=2048, blank=True)
    13     image = models.URLField(max_length=2048, blank=True)