djorm-ext-pgjson field value returned by queryset as string not dict

23 views
Skip to first unread message

Bulat Shaf

unread,
Dec 27, 2013, 3:11:04 PM12/27/13
to django...@googlegroups.com
Hello, django users!

I'm using PostgreSQL 9.3.2 with django 1.5.5.  I've created a model with JSONField from djorm-ext-pgjson.  
After migrating with south I can see my field type is json in postgres.
Then I've put some data and queried for it. On my development laptop I get dict in my json field as I expected.   
Then I did the same thing on my test server, same version of DB, django, libraries. 
psql shows that field type is json.  

But somehow it gives me json field as str.   

Is there anyone who might get throw this kind of issue?    Or may be you can tell me where do I start digging into this?

Bulat Shaf

unread,
Feb 3, 2014, 1:39:44 AM2/3/14
to django...@googlegroups.com
Hello, again!  

I've fixed this!  Problem cause was really simple: on my server machine I had psycopg2 older version installed in global site-packages, and current version throw buildout in my project deps, but it used older version by default. Problem has gone after removing global library.  So my tip is: ISOLATE YOUR PROJECT from global libs, do NOT depend on them whatsoever. That's the lesson I've learned.
Reply all
Reply to author
Forward
0 new messages