simonb.com: blog > articles from Wednesday, 8 July 2009

skip to content
You are here: 

On Wednesday, 8 July 2009 we wrote…

Wednesday, 8 July 2009

Django Related And Inherited Name Attribute Clash

Bare with me it's a long story...

When deleting an object I was getting this error from Django:

'RelatedManager' object has no attribute '_collect_sub_objects'

The reason was an attribute name clash on a base class. Finding the reason took some time so here's the low down in case any one else runs in to this.

In one app I had a model Company:

class Company(models.Model):
    name = models.CharField(max_length=1024)

and in another app I had a model AdClient:

class AdClient(models.Model):
    company = models.ForeignKey(Company, related_name='client')

Then some time later I wrote a new app inheriting from Company as:

class Client(Company): name =…

read more

Tags: 

 

Wednesday, 8 July 2009

IE6 Go Home

Go home IE6

IE6 is the bane of web developers everywhere. Greatly illustrated as the drunk-loser-relative in the above image from John Martz. Flickr has a larger version. There is hope on the horizon: MS is installing IE8 by default via Windoze Update. So the worst should be behind us in browser land at least. Email clients are another story.

read more

Tags: