Re: Id error

12 views
Skip to first unread message

Paul Backhouse

unread,
Aug 31, 2012, 11:53:52 AM8/31/12
to django...@googlegroups.com
In your CountryForm, calling super(self.__class__)... might not be a
good idea. You should name the class, ie.

super(CountryForm, self).save(*args, **kwargs)

I'd also be wary of defining a class called 'Object', since python
already has 'object' as part of its "new style" classes.

Paul

On Fri, 2012-08-31 at 07:58 -0700, Drvanon wrote:
> Hello django-ers,
>
>
> Today I had a good dream in which I though I fixed something in my
> bug-magnet.


Drvanon

unread,
Aug 31, 2012, 2:44:42 PM8/31/12
to django...@googlegroups.com

In your CountryForm, calling super(self.__class__)... might not be a
good idea. You should name the class, ie.

    super(CountryForm, self).save(*args, **kwargs)

Just did that, had no effect. 
 
 
I'd also be wary of defining a class called 'Object', since python
already has 'object' as part of its "new style" classes.
 
I can understand why, but till now it didn't give any problems and I too don't see why it should except for reading. But it greatly enlarges my understanding of what ever I might be doing.
Reply all
Reply to author
Forward
0 new messages