Skip to content

Instantly share code, notes, and snippets.

@ANtlord
Last active July 10, 2017 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ANtlord/8dce3a4df234841fd876fb808eb36a78 to your computer and use it in GitHub Desktop.
Save ANtlord/8dce3a4df234841fd876fb808eb36a78 to your computer and use it in GitHub Desktop.
class AnotherModel(models.Model)
#...
class MyModel(MPTTModel):
parent = TreeForeignKey('self', null=True, blank=True, db_index=True, related_name='children')
shifted_finish_date_from = TreeForeignKey(
AnotherModel, related_name='another_children', null=True, blank=True, db_index=True
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment