0👍
✅
While using the Django form prefix
was partially correct (thanks @ Daniel Roseman), the assertion that it doesn’t matter how many form elements I have is not quite correct. It does matter, because by default the prefix was meant to be used in one form (as it creates multiple replicate id
s). To use it in multiple forms, you also need auto_id=False
. This prevents the id from being generated by the Django form.
2👍
You can use the prefix
parameter when instantiating your forms to give them non-conflicting ids.
- [Answered ]-Exception messages: What does it mean? – django 1.8 python 3.4 – python manage.py makemigrate
- [Answered ]-ModelForm and unique_together validation
Source:stackexchange.com