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/relationtype.py | |
parent | f7ded0f46dfd50ee80e59a5f80fc0cd23f6455be (diff) | |
download | gnowsys-ca3767f7b4ef17423e130f70bbdf986e2e0a222e.tar.gz |
markitup added to admin interface
Diffstat (limited to 'gstudio/admin/relationtype.py')
-rw-r--r-- | gstudio/admin/relationtype.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gstudio/admin/relationtype.py b/gstudio/admin/relationtype.py index 37e1a33..f83f108 100644 --- a/gstudio/admin/relationtype.py +++ b/gstudio/admin/relationtype.py @@ -10,6 +10,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 @@ -86,6 +87,11 @@ class RelationtypeAdmin(parent_class): def __init__(self, model, admin_site): self.form.admin_site = admin_site super(RelationtypeAdmin, self).__init__(model, admin_site) + + def formfield_for_dbfield(self, db_field, **kwargs): + if db_field.name == 'content': + kwargs['widget'] = AdminMarkItUpWidget() + return super(RelationtypeAdmin, self).formfield_for_dbfield(db_field, **kwargs) # Custom Display def get_title(self, relationtype): |