mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-27 07:02:26 +00:00
Affichage des objets liés quand c'est necessaire (interfaces-machines-domain)
This commit is contained in:
parent
513933abba
commit
5596abf4df
1 changed files with 4 additions and 0 deletions
|
@ -40,6 +40,7 @@ from django.conf import settings
|
|||
from contributors import contributeurs
|
||||
import os
|
||||
import time
|
||||
from itertools import chain
|
||||
import users, preferences, cotisations, topologie, machines
|
||||
|
||||
def form(ctx, template, request):
|
||||
|
@ -146,6 +147,9 @@ def history(request, application, object_name, object_id):
|
|||
))
|
||||
pagination_number = GeneralOption.get_cached_value('pagination_number')
|
||||
reversions = Version.objects.get_for_object(instance)
|
||||
if hasattr(instance, 'linked_objects'):
|
||||
for related_object in chain(instance.linked_objects()):
|
||||
reversions = reversions | Version.objects.get_for_object(related_object)
|
||||
paginator = Paginator(reversions, pagination_number)
|
||||
page = request.GET.get('page')
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue