Live data from Hacker News

Django 4.1

djangoproject.com

121–126 of 126 posts

Re: Django 4.1

#121
post #114

Django is single-handedly responsible for making me fall in love with programming. I am now using Elixir/Phoenix and 100% sold on the benefits of working with immutable data, but I still keep an eye on developments in the Python/Django ecosystem. Seeing Django edge closer to having a fully async stack is very exciting, and should make it a more viable platform for existing users as well as newcomers.

i have dabbled with web programming several times in the past, with a variety of frameworks (sinatra, rails, phoenix, fastapi, and now django). django is the first time i have felt truly productive - its architecture is the perfect balance between sinatra (doesn't do enough) and rails/phoenix (where i keep getting lost in a maze of generated code). also the orm really gets out of your way.

I agree. Django is the only framework that makes sense to me. I have been doing web programming full time since 2006, using only vanilla code ( there were no frameworks back then). Django is the only framework that tempts me.

Re: Django 4.1

#122

Am I bad SWE if I do not care for for async in django? I am sure a a lot of django devs will like it, but if I need the performance that I would get from going async, I would not being using django as my web framework. FWIW I like django / python for a lot of things, just not for performance.

It obviously has it’s used, but I have never needed async in my 17 years as a web programmer…

Re: Django 4.1

#123

Earlier quoted context omitted.

> If I was running a trading clearing house, or Instagram, I'd probably care about marginal improvements, and then use another language. Ha, Instagram was written in Django!

Right, though they're stuck on 1.8 (upgraded to 1.8 only so they could use python3), and really just use it for request/response/views, not ORM or anything else.

Are they using DRF? Because obviously mobile app can't use templates and Django doesn't default support REST endpoints, does it?

Re: Django 4.1

#124

Earlier quoted context omitted.

Right, though they're stuck on 1.8 (upgraded to 1.8 only so they could use python3), and really just use it for request/response/views, not ORM or anything else.

Are they using DRF? Because obviously mobile app can't use templates and Django doesn't default support REST endpoints, does it?

> Django doesn't default support REST endpoints, does it?

You just have to manually call json.parse(request.body) for incoming requests and return JsonResponse(data). And you generally need to serialize the data yourself.

Django does have some built-in model serialization, but that's mostly for import/export data, not really for sending to the browser.

Re: Django 4.1

#125
post #118

Earlier quoted context omitted.

You're giving me nightmares. I used to work for a company stuck on Python 2.7 and Django 1.something. They're still on it today.

I'll qualify mine by pointing out that it doesn't have a database and is just a web client, a veneer, over a very secure API that really does all of the work. The Django I use is nothing but a template rendering thing.

Sounds like a perfect app for PHP.

Re: Django 4.1

#126
post #2

I wonder how popular the async interface will become. I use Python and Django extensively but haven't touch any of the async operations.

Since ultimately anything you build in Django will eventually go into the ORM layer, it won't become anything unless the ORM is fully async. This release brings the async API to it, but: > Note that, at this stage, the underlying database operations remain synchronous That kinda defeats the whole purpose of an ASGI app.

>That kinda defeats the whole purpose of an ASGI app.

Unless I’m missing something, wouldn’t an async ORM provide significant benefit for apps with an internet-based DB connection? I would think the underlying DB ops would be much faster than sending a request and waiting on a response.

Post reply on HN