How to verify object creation in Django ?
- by Martin
So.. this never crossed my head before but now I just can't figure out how to do that !!
I want to verify that the object I created was really created, and return True or False according to that :
obj = object(name='plop')
try:
obj.save()
return True
except ???:
return False
Any idea ?
Cheers,
-M