Answer the question
In order to leave comments, you need to log in
How to get the count of something with a filter in django?
Hello, there is the following code for writing clients to the models.py master - in short, the main one:
class MasterProfile(models.Model):
name = models.TextField('Имя', max_length=100)
avatar = models.ImageField('Аватар', upload_to='avatarts/%Y')
class Visit(models.Model):
created_date = models.DateField(auto_now=True)
master = models.ForeignKey(MasterProfile, on_delete=models.DO_NOTHING)
start_at = models.DateTimeField('Начало проведения')
client_name = models.CharField('Имя клиента', default='Нет имени', max_length=30)
status_service = models.BooleanField(default=False)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question