mirror of
https://github.com/ae-utbm/sith.git
synced 2026-06-04 23:29:24 +00:00
Migrate albums and pictures to their own tables
This commit is contained in:
+2
-14
@@ -4,22 +4,10 @@ from model_bakery.recipe import Recipe, foreign_key
|
||||
|
||||
from sas.models import Album, Picture
|
||||
|
||||
album_recipe = Recipe(
|
||||
Album,
|
||||
is_in_sas=True,
|
||||
is_folder=True,
|
||||
is_moderated=True,
|
||||
parent_id=settings.SITH_SAS_ROOT_DIR_ID,
|
||||
name=seq("Album "),
|
||||
)
|
||||
album_recipe = Recipe(Album, is_moderated=True, name=seq("Album "))
|
||||
|
||||
picture_recipe = Recipe(
|
||||
Picture,
|
||||
is_in_sas=True,
|
||||
is_folder=False,
|
||||
is_moderated=True,
|
||||
parent=foreign_key(album_recipe),
|
||||
name=seq("Picture "),
|
||||
Picture, is_moderated=True, album=foreign_key(album_recipe), name=seq("Picture ")
|
||||
)
|
||||
"""A SAS Picture fixture.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user