user_zaim(models.Model)
user_zaim = models.OneToOneField(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, null=True,
blank=True, default= None)
people = models.ForeignKey(People, help_text = 'Фамилия, имя учащегося', on_delete = models.SET_NULL, null=True, related_name="peoples")
date_list = State.objects.all()
for obj in date_list:
for person in obj.peoples:
person.name
person.status
def ServiceListView(request):
serv_list= Service.objects.all().order_by('name')
returnt render (request, 'services.html', {'serv_list':serv_list})
{% for serv in serv_list %}<td>{{ serv.name }}</td>{% endfor %}