Answer the question
In order to leave comments, you need to log in
How to select multiple performers in a field?
How to select multiple artists from the list? Now there is only one performer.
Here is the models.py code:
from django.db import models
class Executor(models.Model):
name = models.CharField(max_length=32, null=True)
def __str__(self):
return self.name
class Task(models.Model):
name = models.CharField(max_length=100, null=True)
executor = models.ForeignKey(Executor, on_delete=models.CASCADE)
def __str__(self):
return self.name
class Project(models.Model):
name = models.CharField(max_length=32, null=True)
tasks = models.ForeignKey(Task, on_delete=models.CASCADE)
def __str__(self):
return self.name
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