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/attributetype.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gstudio/admin/attributetype.py') diff --git a/gstudio/admin/attributetype.py b/gstudio/admin/attributetype.py index c1f03d9f..c44db82b 100644 --- a/gstudio/admin/attributetype.py +++ b/gstudio/admin/attributetype.py @@ -20,11 +20,15 @@ from gstudio.managers import HIDDEN from gstudio.managers import PUBLISHED from gstudio.ping import DirectoryPinger from gstudio.admin.forms import AttributetypeAdminForm +from gstudio.settings import GSTUDIO_VERSIONING +if GSTUDIO_VERSIONING == True: + parent_class = reversion.VersionAdmin +else: + parent_class = admin.ModelAdmin - -class AttributetypeAdmin(reversion.VersionAdmin): +class AttributetypeAdmin(parent_class): """Admin for Attributetype model""" form = AttributetypeAdminForm date_hierarchy = 'creation_date' -- cgit v1.2.3-70-g09d2