Live data from Hacker News

Django: what’s new in 6.0

adamj.eu

91–100 of 127 posts

Re: Django: what’s new in 6.0

#91
post #42

Template partials look good, which is one of the key reasons frameworks like React are as good and popular as they are, because you can reuse small segments of code.

Amazing that Django didn't have this until 2025

It's had includes and custom template tags for over a decade. Partials are a slightly nicer design for a subset of that pattern.

Re: Django: what’s new in 6.0

#92
post #89

Earlier quoted context omitted.

In the context of background jobs idempotent means that if your job gets run for a second time (and it will get run for a second time at some point, they all do at-least-once delivery) there aren't any unfortunate side effects to that. Often that's just a case of checking if the relevant database updates have already been done, maybe not firing a push notification in cases of a repeated job.

If you need idempotent db writes, then use something like Temporal. You can't really blame Celery for not having that because that is not what Celery aims to be.

Temporal requires a lot more setup than setting up a Redis instance though. That's the only problem with it. And I find the Python API a bit more difficult to grasp. But otherwise a solid piece of technology.

Re: Django: what’s new in 6.0

#93
post #3

Any code or blog written by Adam is worth spending some time on. It will be interesting to see how the tasks framework develops and expands. I am sad to see the great Django-Q2 lumped in with the awful Celery though.

[deleted]

Re: Django: what’s new in 6.0

#94
post #89

Earlier quoted context omitted.

In the context of background jobs idempotent means that if your job gets run for a second time (and it will get run for a second time at some point, they all do at-least-once delivery) there aren't any unfortunate side effects to that. Often that's just a case of checking if the relevant database updates have already been done, maybe not firing a push notification in cases of a repeated job.

If you need idempotent db writes, then use something like Temporal. You can't really blame Celery for not having that because that is not what Celery aims to be.

With Temporal, your activity logic still needs to ensure idempotency e.g. by checking if an event id / idempotency key exists in a table. It's still at-least-once delivery. Temporal does make it easy to mint an idempotency key by concatenating workflow run id and activity id, if you don't have a one provided client-side.

Re: Django: what’s new in 6.0

#95

Dude, I used Django at 1.x - before they even had an ORM. The fact that it is adding a way to run tasks, almost a quarter of a century later, is wild to me. I am not roasting it or anything, go Django, but just an observation.

Django had ORM from the very beginning. I've been using Django since 0.95 at it had ORM even back then. It was primitive but I hadn't to resort to raw SQL until much later.

Re: Django: what’s new in 6.0

#96

Dude, I used Django at 1.x - before they even had an ORM. The fact that it is adding a way to run tasks, almost a quarter of a century later, is wild to me. I am not roasting it or anything, go Django, but just an observation.

Django had ORM from the very beginning. I've been using Django since 0.95 at it had ORM even back then. It was primitive but I hadn't to resort to raw SQL until much later.

Correction - it was an "ORM". I remember now, but it was so rudimentary and useless that I never really thought of it that way.

Nothing wrong with that. One had to start somewhere.

Re: Django: what’s new in 6.0

#97
I've been using Django on and off at work for the past few years. I really like it. That being said, I still find its ORM difficult. I understand it now that since it's an opinionated framework, I need to follow Django way of thinking. The main issue is that at work, I have multiple databases from different business units. So I constantly have to figure out a way to deal with multiple databases and their idiosyncrasies. I ended up doing a lot of hand holding by turning off managed, inspectdb and then manually delete tables I don't want to show via website or other reasons. For green webapps we have, django is as good as it gets.

Re: Django: what’s new in 6.0

#98

Dude, I used Django at 1.x - before they even had an ORM. The fact that it is adding a way to run tasks, almost a quarter of a century later, is wild to me. I am not roasting it or anything, go Django, but just an observation.

I think it is refreshing. They don't half-ass things into the framework. They take the time to do it right. They let every feature fight for its life, and put their effort into LTS and minimizing number of issues and API changes related to the features they do deliver. As a developer I really appreciate this. I don't have to totally rewrite my entire application every new version because the implementation wasn't pro…

I used to have this opinion about ASP.NET then ASP.NET Core and the great churn happened. It's finally settled down again, but boy the in-between years were chaotic.

Not just the Framework -> Core migration itself, but the power to make breaking changes went to their heads, and they started quickly tearing up everything only to change their minds again, such as a short-lived "project.json" syntax.

Django is exactly the technology I'd pick if I wasn't already super familiar with the .NET stack. It's got the "batteries included" feel without the chaotic confusion of a million ways to do things. It doesn't have the breaking changes churn that happens elsewhere too.

Re: Django: what’s new in 6.0

#99
post #97

I've been using Django on and off at work for the past few years. I really like it. That being said, I still find its ORM difficult. I understand it now that since it's an opinionated framework, I need to follow Django way of thinking. The main issue is that at work, I have multiple databases from different business units. So I constantly have to figure out a way to deal with multiple databases and their idiosyncrasi…

Maybe this shows my data analyst tendencies, but why not use SQL?

Re: Django: what’s new in 6.0

#100
post #74
post #3

Any code or blog written by Adam is worth spending some time on. It will be interesting to see how the tasks framework develops and expands. I am sad to see the great Django-Q2 lumped in with the awful Celery though.

Celery is the worst background task framework, except for all the others. There are bugs and issues, but because so many people are using it, you’re rarely the first to stumble upon a problem. We processed double-digit millions of messages daily with Celery + RabbitMQ without major obstacles. Regardless of what people say, it should be your first go-to.

I think Celery has a lot of magic happening under it. When the abstractions are so high, it's important they never leak and you don't see anything below the turtles you are supposed to see.

I often prefer designing around explicit queues and building workers/dispatchers. One queuing system I miss is the old Google App Engine one - you set up the queue, the URL it calls with the payload (in your own app), the rate it should use, and that's it.

Post reply on HN