Get in touch!
Back

Ram's picks #3

By Ram Parameswaran Ram's Picks

Screenshot from 2021-03-23 15-37-31.webp


Django-Jsonfield-Backport

Django v3 introduced a cross-database JSONField, meaning we no longer need to import JSONField from third-party packages, and we no longer require PostreSQL to use JSONFields! More importantly, this means that we can now use JSONField with the Sqlite3 database backend** 🎉🎊

This solves a super-common bugbear for me. I commonly want to do some quick and dirty Django development on my local machine. But because the one of the Django models uses a JSONField, I would be forced to setup a Postgres database, and look up all those psql commands and set up the DB authentication, etc. But now, I can continue using Sqlite3. And when I muck up my database, I can just delete the sqlite3.db file and start again.

But of course, it is not always trivial to upgrade your project to Django v3. For those situations, django-jsonfield-backport gives backwards compatibility for the new JSONField on Django v2.2. Just brilliant. 💯

I also really like the backstory behind this mammoth feature release. The author of both the JSONField update and the django-jsonfield-backport package is Sage Abdullah, the 2020 Google Summer of Code scholar. I recommend listening to his interview on the Django Chat Podcast. His achievement goes to show that making epic contributions is not limited to the Django veterans (those people who have been using Django since version 0.x). Young, newcomers can make just as much (or more) of an impact!

** This still doesn't mean that you should use Sqlite3 in production though... 😛


I am on Medium!

I've started publishing my more contentful blog posts on Medium. Come check me out here!

Ram Parameswaran

about Ram Parameswaran

Django & React Developer, Data Geek and Maker-Enthusiast.
Ram builds web applications that help businesses operate more efficiently.