expephalon-playsms/core/models/profiles.py
Klaus-Uwe Mitterer d74a4c1b8b User profile models
SMS OTP provider
Login template (without css)
2020-04-13 20:03:01 +02:00

12 lines
No EOL
411 B
Python

from polymorphic.models import PolymorphicModel
from phonenumber_field.modelfields import PhoneNumberField
from django.db.models import OneToOneField, CASCADE, CharField
from django.contrib.auth import get_user_model
class Profile(PolymorphicModel):
user = OneToOneField(get_user_model(), CASCADE)
mobile = PhoneNumberField(blank=True)
class AdminProfile(Profile):
role = CharField(max_length=64)