djangonauts / django-hstore

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

Hstore with DRF serializer #53

Closed pazooki closed 10 years ago

pazooki commented 10 years ago

Thanks guys for keeping up with this project. it's cool! are you planning to make a django-jsonb for the new versions of postgres? @nemesisdesign I am using your code https://github.com/ninuxorg/nodeshot/blob/master/nodeshot/core/base/fields.py#L142 in my model here: https://gist.github.com/pazooki/96a7d0c79e0d17caceac#file-gistfile1-py-L51 but I haven't been able to get it to work. before using your code and just using hstore.DictionaryField I was getting this error: http://dpaste.com/3WF8PW7 then I realized that I have to write a Field class for hstore so the serializer can handle it properly, then I found your code.

Now I'm facing this problem: http://dpaste.com/03ARC3Q

Would you kindly let me know if you know a way to go around this? Thanks!

""" pip freeze Django==1.6.5 Markdown==2.4.1 PyJWT==0.2.1 South==1.0 django-braces==1.4.0 django-cors-headers==0.12 django-extensions==1.3.8 django-filter==0.7 django-guardian==1.2.2 django-hstore==1.2.5 django-oauth-toolkit==0.7.1 djangorestframework==2.3.14 djangorestframework-jwt==0.1.5 drf-extensions==0.2.4 oauthlib==0.6.3 phonenumbers==6.2.0 psycopg2==2.5.3 python-openid==2.2.5 python-social-auth==0.1.26 requests==2.3.0 requests-oauthlib==0.4.1 six==1.7.3 uWSGI==2.0.6 ujson==1.33 wsgiref==0.1.2 """

nemesifier commented 10 years ago

i think the best thing would be to make a new package for this feature (DRF-HStore) and fix it there

nemesifier commented 10 years ago

@pazooki here's the new package: https://github.com/djangonauts/django-rest-framework-hstore