1
Try Django Smart Selects we use them in our project to solve that exact problem
0
You can try to find a workaround with unique_together (https://docs.djangoproject.com/en/dev/ref/models/options/#unique-together) by overriding it for your special needs.
But it might not be easy: Django Unique Together (with foreign keys)
But it’s never wrong to check values before insert
- Django: How to populate value into form template?
- Django ImportError No module named x.settings
- Django 403 forbidden
- How to customize static_placeholder html code in django cms
- Django not saving ModelChoiceField to base
0
Maybe teacher should be a separate class, and teacher in Task class should be related with teacher from Student class. Maybe usage the through argument is option for it.
- Django admin custom view in model properties
- Djangobyexample book – jquery bookmarklet not working at all
- Next-tab and previous-tab buttons in Django-crispy-forms
Source:stackexchange.com