In my django powered app there is only one obvious case where \"IntegrityError\" can arise. So, how can I catch that error and display a message using templates?
Just import IntegrityError
from django.db import IntegrityError
and use it inside try/Except
try: //Do what is needed to be done except IntegrityError as e: //return what is supposed to be returned
Thanks @Soren I just Edited my answer