From 7a4f561e851fdc7246d804c3abb6748b8a4199a6 Mon Sep 17 00:00:00 2001 From: gnowgi Date: Thu, 15 Mar 2012 16:19:20 +0530 Subject: master trunk of gnowsys-studio --- gstudio/admin/expression.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 gstudio/admin/expression.py (limited to 'gstudio/admin/expression.py') diff --git a/gstudio/admin/expression.py b/gstudio/admin/expression.py new file mode 100644 index 00000000..a6a8fd2c --- /dev/null +++ b/gstudio/admin/expression.py @@ -0,0 +1,13 @@ +"""MetatypeAdmin for Gstudio""" +from django.contrib import admin +from django.core.urlresolvers import NoReverseMatch +from django.utils.translation import ugettext_lazy as _ + +from gstudio.admin.forms import ExpressionAdminForm +import reversion + +class ExpressionAdmin(reversion.VersionAdmin): + def save_model(self, request, expression, form, change): + expression.title = expression.composed_sentence + expression.save() + -- cgit v1.2.3-70-g09d2