diff --git a/django_hstore/templates/hstore_suit_widget.html b/django_hstore/templates/hstore_suit_widget.html new file mode 100644 index 0000000..cc45d58 --- /dev/null +++ b/django_hstore/templates/hstore_suit_widget.html @@ -0,0 +1,69 @@ +{% load i18n %} + + + + + diff --git a/django_hstore/widgets.py b/django_hstore/widgets.py index 3b1e328..4cc86e9 100644 --- a/django_hstore/widgets.py +++ b/django_hstore/widgets.py @@ -80,3 +80,18 @@ class GrappelliAdminHStoreWidget(BaseAdminHStoreWidget): AdminHStoreWidget = GrappelliAdminHStoreWidget else: AdminHStoreWidget = DefaultAdminHStoreWidget + + +class SuitAdminHStoreWidget(BaseAdminHStoreWidget): + """ + Widget that displays the HStore contents + in the django-admin with a nice interactive UI + designed for django-suit + """ + admin_style = 'suit' + + +if 'suit' in settings.INSTALLED_APPS: + AdminHStoreWidget = SuitAdminHStoreWidget +else: + AdminHStoreWidget = DefaultAdminHStoreWidget