4 ms·
I love Django, but version upgrades are a gigantic hassle.
by ldiracdelta 5y ago
I love Django, but version upgrades are a gigantic hassle.
- hdjjhhvvhga 5y agoWhat would you suggest as an alternative for a new project?
- ldiracdelta 5y agoDjango is still my go-to. Specifically [Django-REST-Framework](https://www.django-rest-framework.org/ https://www.django-rest-framework.org/) with a front-end written with [react-static](https://github.com/react-static/react-static https://github.com/react-static/react-static). Django's ORM is so nice and the ecosystem around it rocks. Its biggest downside is painful upgrades. They don't really follow [semantic versioning](https://semver.org/ https://semver.org/)
- matsemann 5y agoTo me however the ORM is one of the most annoying things. Not a fan of ORMs in general, but Django's implementation promotes a usage pattern where django-models are passed around everywhere, leading to hard to untangle dependencies between services once they do literally anything with the objects.
- radus 5y agoI'm relatively new to Django (longtime Flask user), and what struck me about the Django ORM so far is that it seems much easier to write extremely low performance queries. I didn't really feel this way when using SQLAlchemy or peewee, but perhaps that's just my inexperience.
- brianwawok 5y agoI really enjoy the Django ORM, and it is perhaps the main reason I still use it today. Right mix of simplicity and power.
- fb03 5y agowe are using FastAPI + SQLAlchemy here.
- rubyist5eva 5y agoAre you married to Python? Ruby on Rails is mature, with a large set of useful libraries.
- ldiracdelta 5y agoWe're not married, but we're "living in sin"... Once python shows you that blocks are always encoded with indentation for the human readers, then braces or beg/end are just static/visual interference on top of your code that makes it harder to read. Going from python back to braces or beg/end is like going from DVD back to VHS. You didn't notice how bad the static on VHS was until DVD showed you a better way. :-D <touches off small fire>
- lowercased 5y agoI guess I've tended to be more focused on how much I can produce and the quality of the ecosystem vs that level of syntax. My limited experience is that other frameworks, languages and ecosystems allow for more productivity overall. The few places I know using Django are not as productive as the orgs I know using either Laravel or Rails. There may be some 'chicken/egg' stuff going on, but... if lack-of-braces means that much to you, that you'll cut off using other tech stacks altogether, so be it.
- ldiracdelta 5y agoHeheheh. I'm a code craftsman and certain tools I enjoy more than others. It's OK to love the heft and feel of a model-77 wormdrive skilsaw and also to enjoy the cleanliness and readability of python code. Right tool for the job, but ceteris paribus, I prefer python. The tool feels good in your hands. I regularly code in C++, javascript, Rust, and python so I haven't joined a cult, but yes, I do enjoy python.
- rubyist5eva 5y agofunny, I feel the same way about Ruby going to Python - i don't like list comprehensions, for example - feels so crusty and limited compared to yielding blocks in ruby
- Daishiman 5y agoIs there a framework that does them better? The 1.6 transition was the only one that took more than a day for me.
- Klonoar 5y agoI'll second this - I maintain a few different Django backends and it's been smooth sailing upgrading most of them.
- ldiracdelta 5y agoYeah. Tons of other frameworks do it better. React for instance. Any framework that actually follows [semver](https://semver.org/ https://semver.org/) and really cares deeply about backwards compatibility. I've hit backwards incompatibility on almost every upgrade. Not just major 2->3, but each minor release. I still love love love Django, but I do wish upgrades were easier.
- acdha 5y agoWhat kind of things have you hit? I think the last time I had an upgrade take more than a few minutes was around the 1.6-era. (As a reminder that projects vary, I've had more times where I've had to spend time fixing React projects — usually not core but related plugins – so I think there's a heavy element of what you do and how the team works coloring impressions)
- infamia 5y agoMaybe try the new django-upgrade package. https://github.com/adamchainz/django-upgrade https://github.com/adamchainz/django-upgrade It claims you can either just run it or hook it into your CI. It will automatically take care of some of the upgrade chores for you.