Simon Willison’s Weblog

Subscribe
Atom feed for inheritance

3 items tagged “inheritance”

2008

Multiple inheritance of newforms and modelforms. If you ever see “Error when calling the metaclass bases metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases” when trying multiple inheritance with newforms and modelforms, here’s a scary solution I found.

# 12th April 2008, 12:54 pm / django, python, multipleinheritance, metaclasses, inheritance, newforms, modelforms

queryset-refactor changeset 7126. Malcolm just checked model inheritance in to the queryset-refactor branch, with full documentation and unit tests. People have been requesting this for ages.

# 18th February 2008, 9:46 am / inheritance, python, django, querysetrefactor

Transitioning from Java Classes to JavaScript Prototypes. Peter Michaux shows how JavaScript’s prototypal inheritance can run rings around traditional Java-style classes once you figure out how to take advantage of it.

# 10th February 2008, 3:10 pm / javascript, prototypalinheritance, java, classes, inheritance, pete-michaux