mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
Fix pour reversion 2
This commit is contained in:
parent
a3d8b88ae6
commit
bdd6d29fd3
4 changed files with 8 additions and 5 deletions
|
@ -13,6 +13,7 @@ from django.db import transaction
|
|||
from django.forms import modelformset_factory, formset_factory
|
||||
import os
|
||||
from reversion import revisions as reversion
|
||||
from reversion.models import Version
|
||||
|
||||
from .models import Facture, Article, Vente, Cotisation, Paiement, Banque
|
||||
from .forms import NewFactureForm, TrezEditFactureForm, EditFactureForm, ArticleForm, DelArticleForm, PaiementForm, DelPaiementForm, BanqueForm, DelBanqueForm, NewFactureFormPdf, SelectArticleForm
|
||||
|
@ -399,7 +400,7 @@ def history(request, object, id):
|
|||
else:
|
||||
messages.error(request, "Objet inconnu")
|
||||
return redirect("/cotisations/")
|
||||
reversions = reversion.get_for_object(object_instance)
|
||||
reversions = Version.objects.get_for_object(object_instance)
|
||||
paginator = Paginator(reversions, PAGINATION_NUMBER)
|
||||
page = request.GET.get('page')
|
||||
try:
|
||||
|
|
|
@ -18,7 +18,7 @@ from django.views.decorators.csrf import csrf_exempt
|
|||
from rest_framework.renderers import JSONRenderer
|
||||
from machines.serializers import InterfaceSerializer, TypeSerializer, AliasSerializer, MxSerializer, ExtensionSerializer, NsSerializer
|
||||
from reversion import revisions as reversion
|
||||
|
||||
from reversion.models import Version
|
||||
|
||||
import re
|
||||
from .forms import NewMachineForm, EditMachineForm, EditInterfaceForm, AddInterfaceForm, MachineTypeForm, DelMachineTypeForm, ExtensionForm, DelExtensionForm, BaseEditInterfaceForm, BaseEditMachineForm
|
||||
|
@ -645,7 +645,7 @@ def history(request, object, id):
|
|||
else:
|
||||
messages.error(request, "Objet inconnu")
|
||||
return redirect("/machines/")
|
||||
reversions = reversion.get_for_object(object_instance)
|
||||
reversions = Version.objects.get_for_object(object_instance)
|
||||
paginator = Paginator(reversions, PAGINATION_NUMBER)
|
||||
page = request.GET.get('page')
|
||||
try:
|
||||
|
|
|
@ -5,6 +5,7 @@ from django.db import IntegrityError
|
|||
from django.db import transaction
|
||||
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
|
||||
from reversion import revisions as reversion
|
||||
from reversion.models import Version
|
||||
|
||||
from topologie.models import Switch, Port, Room
|
||||
from topologie.forms import EditPortForm, NewSwitchForm, EditSwitchForm, AddPortForm, EditRoomForm
|
||||
|
@ -46,7 +47,7 @@ def history(request, object, id):
|
|||
else:
|
||||
messages.error(request, "Objet inconnu")
|
||||
return redirect("/topologie/")
|
||||
reversions = reversion.get_for_object(object_instance)
|
||||
reversions = Version.objects.get_for_object(object_instance)
|
||||
paginator = Paginator(reversions, PAGINATION_NUMBER)
|
||||
page = request.GET.get('page')
|
||||
try:
|
||||
|
|
|
@ -14,6 +14,7 @@ from django.utils import timezone
|
|||
from django.core.urlresolvers import reverse
|
||||
from django.db import transaction
|
||||
|
||||
from reversion.models import Version
|
||||
from reversion import revisions as reversion
|
||||
from users.models import User, Right, Ban, Whitelist, School, ListRight, Request
|
||||
from users.models import DelRightForm, BanForm, WhitelistForm, DelSchoolForm, DelListRightForm, NewListRightForm
|
||||
|
@ -545,7 +546,7 @@ def history(request, object, id):
|
|||
else:
|
||||
messages.error(request, "Objet inconnu")
|
||||
return redirect("/users/")
|
||||
reversions = reversion.get_for_object(object_instance)
|
||||
reversions = Version.objects.get_for_object(object_instance)
|
||||
paginator = Paginator(reversions, PAGINATION_NUMBER)
|
||||
page = request.GET.get('page')
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue