If you can convince your company to keep Django up-to-date with every release, I have found this to be easy and pain-free (Django has been pretty API stable since ~1.8), compared with waiting for each LTS and then being forced to jump ahead three versions each time. You also gain access to new features as they come out, this way.
But you have to be careful that all dependencies are up-to-date as well.
Django 3
71–80 of 196 posts
Re: Django 3
#72I have been using FastAPI for the last two months (which also is an ASGI server and makes full use of annotations and type hints with mypy) and the experience has been incredible. ( https://fastapi.tiangolo.com/ ) If Django can now also support annotations and async code I dream of an scenario where apis can be built using this two elements. Does anybody know a good resource to learn/catch up with this release?
[0] https://pyotr.readthedocs.io
Re: Django 3
#73Earlier quoted context omitted.
Your experience is very much unlike my own. Every project I’ve seen hit issues with the database (e.g. unindexed queries, changing data access patterns) first, followed by I/O (especially other services like S3, search, etc.), and RAM usage before CPU became a major factor. It’s possible, of course, but I’ve usually seen it as a symptom of not having a good culture around monitoring and troubleshooting — e.g. I remem…
Of course, if you are incompetent enough to write queries that use no indexes and you don't detect that before you push to prod, you will have problems there. What I mean is: when you start optimising, no matter how well you do, you will eventually hit a CPU performance wall. Then you will realise that only a rewrite will get you out of that hole, and by then it will be late.
Re: Django 3
#74I have been using FastAPI for the last two months (which also is an ASGI server and makes full use of annotations and type hints with mypy) and the experience has been incredible. ( https://fastapi.tiangolo.com/ ) If Django can now also support annotations and async code I dream of an scenario where apis can be built using this two elements. Does anybody know a good resource to learn/catch up with this release?
Re: Django 3
#75Groovy. I am excited to try out the new ASGI goodness. Last time I used Django Channels it was a constant struggle to tune it, prevent it from becoming deadlocked, etc. And the transition from Channels 1.x to 2.x was also not pleasant. I hope that Django proper did things better/differently.
Re: Django 3
#76Earlier quoted context omitted.
I mean, what kind of performance issues were you running into? You're not going to get maximum performance out of a python program, generally. But unless your python program is using 100% cpu that's not really an issue, and there are very few cases where I'm using python and it's CPU that's slowing down the program. Mostly it ends up being some kind of IO. If you're looking to do complicated mathematical operations,…
In my experience most people creating CRUD websites with Django will hit a CPU bottleneck.
Re: Django 3
#77Groovy. I am excited to try out the new ASGI goodness. Last time I used Django Channels it was a constant struggle to tune it, prevent it from becoming deadlocked, etc. And the transition from Channels 1.x to 2.x was also not pleasant. I hope that Django proper did things better/differently.
Well there's no actual async support for views in 3.0 - we missed the cutoff due to performance concerns! Hopefully it'll be in 3.1.
Re: Django 3
#78This looks neat. Does anyone have experience with using type hints and mypy with Django? Any gotchas?
Re: Django 3
#79Does Python still have performance issues? That's always been my concern when considering its adoption.
Yes. If you can afford the CPU power, by all means go with Python. Otherwise just don't. Instagram can afford it so it works fine for them. Reddit can't, so their site is always slow or down.
Re: Django 3
#80Right as I was just about to start a new Django project... The thought going through my mind right now is "I wonder if there is some way of creating a Django project and make it resilient to future Django updates and releases with minimum fuss?" I've had to deal with ongoing and inherited legacy projects which run on Python 2.7, use the long-deprecated Pylons, for which there is no easy upgrade path other than a tota…
I work as a contractor and have codebases in python, f#, delphi, swift, obj-c and now rust. > "I wonder if there is some way of creating a ???? project and make it resilient to future??? updates and releases with minimum fuss?" - Use control version (mercurial, git, ...) in everything, including utils and side projects. - Record all dependencies somewhere in the project. - Automate the builds, so you also have how re…