class PersonForm(ModelForm):
class Meta:
model = Person
widgets = {
'date_of_births': forms.DateInput(format='%d-%m-%Y'),
}
SELECT e.name, m2m.count FROM employee AS e INNER JOIN (SELECT employee_id, COUNT(group_id) FROM groups_employees GROUP BY employee_id) AS m2m ON e.id = m2m.employee_id;