Skip to content

Instantly share code, notes, and snippets.

@pipermerriam
Created October 10, 2012 04:18
Show Gist options
  • Save pipermerriam/3863124 to your computer and use it in GitHub Desktop.
Save pipermerriam/3863124 to your computer and use it in GitHub Desktop.
class Listing(...):
def upgrade(self):
return self.__class__.objects.select_subclasses().get(pk=self.pk)
listing = Listing.objects.get(pk=1)
buyerlisting = listing.upgrade()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment