profile routines
This commit is contained in:
SDE
2023-07-11 12:40:33 +03:00
parent 08dfbc352a
commit 2a2a47e2a7
14 changed files with 82 additions and 18 deletions

View File

@@ -18,19 +18,21 @@ User.add_to_class("__str__", user_name_str)
account_type_choices = (
(_('Перевозчик'), 'mover'),
(_('Отправитель'), 'sender')
('mover', _('Перевозчик')),
('sender', _('Отправитель'))
)
class UserProfile(BaseModel):
account_type = models.CharField(
max_length=250, verbose_name=_('Тип учетной записи'), choices=account_type_choices, default='base_account')
max_length=250, verbose_name=_('Тип учетной записи'), choices=account_type_choices, default='sender')
user = models.OneToOneField(User, verbose_name=_('Пользователь'), related_name=u'user_profile',
null=True, blank=True, on_delete=models.CASCADE)
avatar = models.ImageField(upload_to='uploads/', verbose_name=_('Аватар'), null=True, blank=True)
authMailCode = models.CharField(max_length=32, null=True, blank=True)
phone = models.CharField(max_length=100, verbose_name=_('Телефон'), null=True, blank=True)