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/objecttype.py | |
parent | f7ded0f46dfd50ee80e59a5f80fc0cd23f6455be (diff) | |
download | gnowsys-ca3767f7b4ef17423e130f70bbdf986e2e0a222e.tar.gz |
markitup added to admin interface
Diffstat (limited to 'gstudio/admin/objecttype.py')
-rw-r--r-- | gstudio/admin/objecttype.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gstudio/admin/objecttype.py b/gstudio/admin/objecttype.py index 9fdb372..8d0eb4e 100644 --- a/gstudio/admin/objecttype.py +++ b/gstudio/admin/objecttype.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 @@ -111,6 +112,11 @@ class ObjecttypeAdmin(parent_class): get_metatypes.allow_tags = True get_metatypes.short_description = _('metatype(s)') + def formfield_for_dbfield(self, db_field, **kwargs): + if db_field.name == 'content': + kwargs['widget'] = AdminMarkItUpWidget() + return super(ObjecttypeAdmin, self).formfield_for_dbfield(db_field, **kwargs) + def get_tags(self, nodetype): """Return the tags linked in HTML""" try: |