Skip to content

Instantly share code, notes, and snippets.

Alex unthingable

Block or report user

Report or block unthingable

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:2897398
AbstractBase(models.Model):
foo = somefield
class Base(AbstractBase):
c1 = models.OneToOneField('C1', null=True, blank=True)
c2 = models.OneToOneField('C2', null=True, blank=True)
def c(self):
#only one additional query to get the base
if self.c1_id:
You can’t perform that action at this time.