1đź‘Ť
âś…
You’ve excluded firm
from the form, and don’t add it until after validation, so there’s no way the form can validate that the combination of firm and name is unique. You’ll need to pass it int the form some other way and check explicitly in the form’s clean
method that there is no existing instance with that combination.
👤Daniel Roseman
0đź‘Ť
This definition means “Account with this Firm and Name already exists.” You are receiving the same error in both cases,
unique_together = (
'firm', 'name'
)
Exception Value: columns firm_id, name are not unique, that means the same as the admin panel error.
👤lapinkoira
- [Answer]-Migration problems after update Django 1.8.1
- [Answer]-Creating tree editor for mptt model in django admin
- [Answer]-Get the objects of model refrenced in another model as fk django
Source:stackexchange.com