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 =…Tags:
djangoWednesday, 8 July 2009
IE6 Go Home

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.
About
I'm the chief geek of yaean design based in Shanghai.
Tags
- 3D
- ajax
- art
- audio
- bbc
- books
- browsers
- business
- cars
- china
- chinglish
- christmas
- cms
- crowdsourcing
- design
- django
- education
- food
- football
- games
- generators
- gentoo
- guitars
- health
- history
- hongkong
- html5
- humans
- humour
- inspiration
- internet
- iphone
- javascript
- kids
- lego
- life
- linux
- mac
- magazines
- maps
- maths
- media
- mobile
- movies
- music
- mysql
- nasa
- nature
- news
- p4p
- parenthood
- photography
- physics
- poetry
- postgresql
- privacy
- programming
- python
- radio
- research
- restaurants
- robots
- ruby
- security
- shanghai
- solar
- space
- standards
- stories
- superpowers
- tagclouds
- taste
- tech
- travel
- type
- ui
- uk
- ux
- video
- visualisation
- web
- windows
- word
- writing
- yajogo