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
;, 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
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'
>
... 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
4 matches
Mail list logo