You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
editorial_contents=relational_program.contents.filter(Model=EditorialContent) # Possible d'utiliser .filter(Model__in=[EditorialContent, Vendor]) pour récupérer plusieurs types
2) Pour récupérer tous les contenus (contenus éditoriaux, vendors, etc.) liés à un programme relationnel :
Sans GM2M
contents= []
contents_types_ids=relational_program.contents.values_list("content_type", flat=True) # Ou liste en durforcontent_type_idincontent_type_ids:
Avec GM2M
contents=relational_program.contents
3) Pour récupérer les programmes relationnels depuis un contenu éditorial