-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use container API to get unit members
- Loading branch information
1 parent
0efb913
commit 60fdb44
Showing
3 changed files
with
30 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
from django.db import models | ||
|
||
from ..containers.model_mixin import ContainerEntityMixin, ContainerEntityVersionMixin | ||
from ..containers.models_mixin import ContainerEntityMixin, ContainerEntityVersionMixin | ||
|
||
|
||
class Unit(ContainerEntityMixin): | ||
""" | ||
A Unit is Container, which is a PublishableEntity. | ||
""" | ||
|
||
|
||
class UnitVersion(ContainerEntityVersionMixin): | ||
""" | ||
A UnitVersion is a ContainerVersion, which is a PublishableEntityVersion. | ||
""" | ||
|
||
# Not sure what other metadata goes here, but we want to try to separate things | ||
# like scheduling information and such into different models. | ||
unit = models.ForeignKey( | ||
Unit, | ||
on_delete=models.CASCADE, | ||
related_name="versions", | ||
) | ||
|