Re: why is not IntegrityError an attribute of models?

2009-08-03 Thread Malcolm Tredinnick
On Mon, 2009-08-03 at 07:36 -0700, dnedbaylo wrote: [...] > I was thinking about a case where try clause contains couple of save() > calls of different models and each model has unique field. And there > is no way to catch specific to model IntegrityError, > you can catch only "general" IntegrityE

Re: why is not IntegrityError an attribute of models?

2009-08-03 Thread dnedbaylo
;, line 4, in > > AttributeError: type object 'Keyword' has no attribute > > 'IntegrityError' > > > I use latest release of Django, it's 1.1. > > > So, the questions is, why is not IntegrityError an attribute of models > > same way as

Re: why is not IntegrityError an attribute of models?

2009-08-03 Thread Daniel Roseman
se='insurance') > ...   m.save() > ... except models.Keyword.IntegrityError, e: > ...   print e > ... > Traceback (most recent call last): >   File "", line 4, in > AttributeError: type object 'Keyword' has no attribute > 'IntegrityError' >

why is not IntegrityError an attribute of models?

2009-08-03 Thread dnedbaylo
... print e ... Traceback (most recent call last): File "", line 4, in AttributeError: type object 'Keyword' has no attribute 'IntegrityError' I use latest release of Django, it's 1.1. So, the questions is, why is not IntegrityError an attribute of models s