On 1/6/06, Amit Upadhyay <[EMAIL PROTECTED]> wrote:
> What is the rigth way of catching IntegrityError, the traceback I get
> suggests using _mysql_exceptions.IntegrityError, which is
> wrong because it assumes mysql, as well as it goes against the general
> python guideline of not using "hidden" members of modules.

As Dody Suria Wijaya suggested, you should improve your view code to
validate that the user isn't duplicate. Don't rely on the database to
check things; when using Django, database constraints are just a final
safety layer -- not a high-level source of validation.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Reply via email to