ITRadio/server/proj/userProfile/models.py

18 lines
707 B
Python

from django.contrib.auth.models import User
from django.db import models
from django.db.models import JSONField
class Team(models.Model):
name = models.CharField('Имя участника', max_length=50)
last_name = models.CharField('Фамилия участника', max_length=50)
position = models.CharField('Должность участинка', max_length=50)
img_person = models.ImageField('Изображение участника', blank=True, null=True, upload_to="team_images/")
def __str__(self):
return f"{self.last_name} {self.name} - {self.position}"
class Meta:
verbose_name = 'Команда'
verbose_name_plural = 'Команда'