server/authentication/models.py
changeset 63 bd7bcfc86232
parent 51 032280909e65
child 103 b707607e8a38
equal deleted inserted replaced
62:a5f9739dcd46 63:bd7bcfc86232
     1 import json
       
     2 
     1 
     3 from django.contrib.auth.models import AbstractUser, BaseUserManager
     2 from django.contrib.auth.models import AbstractUser
     4 from django.db import models
     3 from django.db import models
     5 from django.utils import timezone
       
     6 import requests
       
     7 
     4 
     8 from config import URL_JAMESPOT
       
     9 
     5 
    10 class AmmicoUser(AbstractUser):
     6 class AmmicoUser(AbstractUser):
    11     idUser = models.CharField(max_length=50, unique=True, blank=True)
     7     idUser = models.CharField(max_length=50, blank=True)
    12     
     8     
    13 class Profile(models.Model):
     9 class Profile(models.Model):
    14     user = models.OneToOneField(AmmicoUser)
    10     user = models.OneToOneField(AmmicoUser)
    15     image = models.URLField(max_length=2048, blank=True)
    11     image = models.URLField(max_length=2048, blank=True)