The path will be this situation. Work teams enter their account and fill out a form on the work done. At the end of the month, the foreman enters his account and sees all these records, he must confirm them (checkbox), it is possible to correct them, and write comments. Let the model look like this:
class TaskList(models.Model): worker = models.Charfield(max_length=50) task = models.CharField(max_length=20) date = models.DateField() signed = models.BooleanField(default=0) comment = models.CharField(max_length=200) Forms:
class TaskFormWorker(ModelForm): class Meta: model = TaskList fields = ['task', 'date'] class TaskFormManager(ModelForm): class Meta: model = TaskList fields = [f.name for f in TaskList._meta.get_fields()] That is, the Brigadier presses the task in the task list and falls into the detail available for editing.
How to make the data for the selected task from the database fall into the form?
For example, I will pass the task ID through the URL, get a TaskList instance, but how can I send it to the form? ..