Monday, January 28, 2019

checkng for uniqueness of a field in django Admin

Hello

In django admin, I have a model with a model fiel "tech_number" which must be unique across the table. If I do not check the uniqueness, it raises a Django integrity error. According to the documentation it sounds normal.

I checked the uniqueness of the" tech_number" in the clean of the model form. but now it raises a validation error even in the change form. In fact it should ask if I needs to erase the existing one.

What did I miss?

Piscvau

No comments:

Post a Comment