TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A JSON field type for Django

96 pointsby aychedeeabout 11 years ago

10 comments

kanjaabout 11 years ago
Hopefully this will soon be added to django core - it&#x27;s one of the goals as part of Marc Tamlyn&#x27;s kickstarter to improve postgres support in django.<p><a href="https://www.kickstarter.com/projects/mjtamlyn/improved-postgresql-support-in-django" rel="nofollow">https:&#x2F;&#x2F;www.kickstarter.com&#x2F;projects&#x2F;mjtamlyn&#x2F;improved-postg...</a>
jessedhillonabout 11 years ago
Really not trying to troll here, but I want to know why anyone uses a Python ORM here other than SQLAlchemy? It&#x27;s been a while since I used Django&#x27;s ORM but I recall the comparison between the two being very heavily in sqla&#x27;s favor.
评论 #7394108 未加载
评论 #7396277 未加载
评论 #7394510 未加载
评论 #7393876 未加载
评论 #7403897 未加载
评论 #7395129 未加载
tonylampadaabout 11 years ago
Have you looked at <a href="https://pypi.python.org/pypi/django-jsonfield/" rel="nofollow">https:&#x2F;&#x2F;pypi.python.org&#x2F;pypi&#x2F;django-jsonfield&#x2F;</a> before building your json field? If so, can you elaborate about how those implementations compare with each other?
评论 #7396159 未加载
gewekeabout 11 years ago
It&#x27;s not Django, but I&#x27;ve built something quite similar for Rails, and have really loved using it. The combination of RDBMS stability and the flexibility of schemaless content is really powerful -- it is (IMHO) the best of both worlds.<p>Would love to hear people&#x27;s experience with this kind of setup (no matter what software you&#x27;re using)...I think it&#x27;s a very interesting, and useful, direction to go, especially for new projects where you may not want the overhead of multiple storage systems.<p><a href="https://github.com/ageweke/flex_columns" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ageweke&#x2F;flex_columns</a>
damon_cabout 11 years ago
Thanks for this! I use some of the various json fields that exist already but have been feeling like it is about time to start using the built in Postgres JSON support instead of just TextFields.
jpdllaabout 11 years ago
This looks great, but how does it compare to already existing options like django-jsonfield or jsonfield?
评论 #7393000 未加载
andybakabout 11 years ago
Remember to add it here when it&#x27;s released: <a href="https://www.djangopackages.com/grids/g/json-fields/" rel="nofollow">https:&#x2F;&#x2F;www.djangopackages.com&#x2F;grids&#x2F;g&#x2F;json-fields&#x2F;</a>
Pitarouabout 11 years ago
What are the engineering trade-offs here? Metric were migrating from CouchDB, so using a JSON field is the obvious solution, but what about for new projects?<p>Compare it to say, Django-CMS, which achieves pretty much the same thing by storing the tree data-structure directly in SQL. The `django-mptt` library handles the details of efficiently implementing a tree structure in SQL, and `south` simplifies database scheme migration. As a programmer, which system would you rather work with?
评论 #7397422 未加载
misiti3780about 11 years ago
You should use hstore to store json in postgres also - no?<p><a href="https://github.com/djangonauts/django-hstore" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;djangonauts&#x2F;django-hstore</a><p>I think the issue with that is it converts everything to string so you need to use json.loads().
评论 #7395042 未加载
dangayleabout 11 years ago
You should also get this up on Github quick :)
评论 #7393322 未加载