djangonauts / django-hstore

PostgreSQL HStore support for Django.
http://django-hstore.readthedocs.io/
Other
517 stars 142 forks source link

support theme Django Suit #85

Closed vechorko closed 9 years ago

vechorko commented 9 years ago

I added hot fix for support theme django suit.

django_hstore/widgets.py ``` class SuitAdminHStoreWidget(BaseAdminHStoreWidget): """ Widget that displays the HStore contents in the suit django-admin with a nice interactive UI """ admin_style = 'suit' ```
templates/hstore_suit_widget.html ``` {% load i18n %} ```
nemesifier commented 9 years ago

@vechorko better to ship this in a separate python-package. We find it tough to mantain this library how it is already, We cannot mantain additional features intended for other python libraries. If you publish this in a small python module we'll add a link in the docs.

nlundquist commented 9 years ago

Put this in a separate module? I don't see how it would be possible to add an alternative widget in your package without modifying the source.

nemesifier commented 9 years ago

It's quite easy to accomplish. Any field in django is a class and widget can be passed as arguments to fields. So this widget could be an external python package and django-hstore can be initialized with that widget. If anyone wants to add support to an external library that someone should be in charge of writing tests and mantaining it over time.