G
G
Gashington2013-11-26 10:41:39
Django
Gashington, 2013-11-26 10:41:39

Where to handle exceptions in Django admin?

Hello I'm new to django I have a question how to handle exceptions in the django admin panel? For example, there is a field with a unique parameter. When adding a field value with unique to the database again, an exception will occur django.db.IntegrityError Tell me where to catch and process this error?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alz, 2013-11-26
@Gashington

Create a form for the model that will check the uniqueness of the combination of fields and throw a ValidationError if not unique

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question