diff options
author | gnowgi <nagarjun@gnowledge.org> | 2012-03-15 16:19:20 +0530 |
---|---|---|
committer | gnowgi <nagarjun@gnowledge.org> | 2012-03-15 16:19:20 +0530 |
commit | 7a4f561e851fdc7246d804c3abb6748b8a4199a6 (patch) | |
tree | d2afc3463fd49625a9be482012f5c3bfcf7c42b9 /gstudio/admin/expression.py | |
download | gnowsys-7a4f561e851fdc7246d804c3abb6748b8a4199a6.tar.gz |
master trunk of gnowsys-studio
Diffstat (limited to 'gstudio/admin/expression.py')
-rw-r--r-- | gstudio/admin/expression.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gstudio/admin/expression.py b/gstudio/admin/expression.py new file mode 100644 index 0000000..a6a8fd2 --- /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() + |