Skip to content

Instantly share code, notes, and snippets.

View craigds's full-sized avatar
👾
mildly amused

Craig de Stigter craigds

👾
mildly amused
View GitHub Profile
@classmethod
def with_base_model(cls, base_model):
"""
This returns an MPTTModel CLASS with the given base model.
Used for linearizing inheritance chains.
The given model should be abstract.
"""
if cls is not MPTTModel:
raise RuntimeError, "with_base_model() must be called on MPTTModel"
{"comment":{"gravatar_id":"67a1b68aca6b44984ff9b8bdb30fc6ed","created_at":"2010/09/11 23:29:15 -0700","body":"[insin](http://github.com/insin) (29 Dec 07):\n\nMaking this a blocker for the first public release, as modifying a parent currently\nleaves the tree in an invalid state.","updated_at":"2010/09/11 23:29:15 -0700","id":401907,"user":"craigds"}}
#!/usr/bin/env python
from datetime import datetime
import os
import sys
import gdata.projecthosting.client
import gdata.projecthosting.data
import gdata.gauth
import gdata.client
import gdata.data