From ff3302db35cf7689e2abc0f52d5058c974925784 Mon Sep 17 00:00:00 2001 From: Kabir Date: Thu, 17 May 2012 14:18:52 +0530 Subject: Admin files with modifications for disabling versioning added --- gstudio/admin/metatype.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gstudio/admin/metatype.py') diff --git a/gstudio/admin/metatype.py b/gstudio/admin/metatype.py index bb24fc75..f110bac1 100644 --- a/gstudio/admin/metatype.py +++ b/gstudio/admin/metatype.py @@ -5,8 +5,13 @@ from django.utils.translation import ugettext_lazy as _ from gstudio.admin.forms import MetatypeAdminForm import reversion +from gstudio.settings import GSTUDIO_VERSIONING +if GSTUDIO_VERSIONING == True: + parent_class = reversion.VersionAdmin +else: + parent_class = admin.ModelAdmin -class MetatypeAdmin(reversion.VersionAdmin): +class MetatypeAdmin(parent_class): """Admin for Metatype model""" form = MetatypeAdminForm fields = ('title','altnames', 'parent', 'description', 'slug') -- cgit v1.2.3-70-g09d2