diff options
author | supriya <supriya@dragbox.(none)> | 2012-06-29 11:20:00 +0530 |
---|---|---|
committer | supriya <supriya@dragbox.(none)> | 2012-06-29 11:20:00 +0530 |
commit | ca3767f7b4ef17423e130f70bbdf986e2e0a222e (patch) | |
tree | 50fb6e490e5f8b3c2cffe2d032c34b81545cf03e /gstudio/admin/processtype.py | |
parent | f7ded0f46dfd50ee80e59a5f80fc0cd23f6455be (diff) | |
download | gnowsys-ca3767f7b4ef17423e130f70bbdf986e2e0a222e.tar.gz |
markitup added to admin interface
Diffstat (limited to 'gstudio/admin/processtype.py')
-rw-r--r-- | gstudio/admin/processtype.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gstudio/admin/processtype.py b/gstudio/admin/processtype.py index 1862de3..011c913 100644 --- a/gstudio/admin/processtype.py +++ b/gstudio/admin/processtype.py @@ -11,7 +11,7 @@ from django.conf.urls.defaults import patterns from django.conf import settings as project_settings from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse, NoReverseMatch - +from markitup.widgets import AdminMarkItUpWidget from tagging.models import Tag import reversion @@ -73,6 +73,11 @@ class ProcesstypeAdmin(parent_class): self.form.admin_site = admin_site super(ProcesstypeAdmin, self).__init__(model, admin_site) + def formfield_for_dbfield(self, db_field, **kwargs): + if db_field.name == 'content': + kwargs['widget'] = AdminMarkItUpWidget() + return super(ProcesstypeAdmin, self).formfield_for_dbfield(db_field, **kwargs) + # Custom Display def get_title(self, processtype): """Return the title with word count and number of comments""" |