Live data from Hacker News

Django 6

docs.djangoproject.com

111–120 of 192 posts

Re: Django 6

#111

What is the Java equivalent of Django? I really love django and everything around it, but I would also like to write a webapp in Java. Getting django + rest_framework up and running and actually be productive takes me max 10 minutes, trying to do the same with spring boot I am a week in and I had to open the jakarta specs to understand the magic.

There used to be JHipster, not sure if still around

Re: Django 6

#112
post #39
post #13

Can someone remind me how we ended up in the SPA era and why exactly? Was it about not seeing the loading spinner? Or there were more reasons to it?

Because the web was made to render documents, but users want apps. CSS in part is so confusing because its original incarnations pulled heavily from traditional print media layout terms. Everything since then was an attempt to leverage JS to turn documents into applications. Why? Ask any user.

Uh, I certainly don't want apps. The Web is a terrible app platform, native is so much better in every case. Just documents, please.

Re: Django 6

#113
post #110

Congrats to the Django team! If anyone is curious, I've been maintaining a Docker Compose based Django + Celery + Postgres + Redis + esbuild + Tailwind starter app for years and just updated it for Django 6.0 at https://github.com/nickjj/docker-django-example . The only thing I haven't done is pre-configure the new CSP settings because I want to let that marinate a bit before putting it in as a default.

Very cool and can tell you keep up with it just with your addition of uv!

Re: Django 6

#114
post #113
post #110

Congrats to the Django team! If anyone is curious, I've been maintaining a Docker Compose based Django + Celery + Postgres + Redis + esbuild + Tailwind starter app for years and just updated it for Django 6.0 at https://github.com/nickjj/docker-django-example . The only thing I haven't done is pre-configure the new CSP settings because I want to let that marinate a bit before putting it in as a default.

Very cool and can tell you keep up with it just with your addition of uv!

Thanks.

Switching to uv ~6-7 months ago was so worth it. It took like 3 seconds to repackage this project thanks to uv, that's building and locking every dependency with Docker too.

Re: Django 6

#115
post #13

Can someone remind me how we ended up in the SPA era and why exactly? Was it about not seeing the loading spinner? Or there were more reasons to it?

No one has mentioned it: mobile! Mobile apps became a thing, and there was a strong argument to have one common backend for your web app and your iOS app and your Android app. Plus the mobile UX (especially with iOS apps at the time) was such a gamechanger that there was a natural shift to replicate it in the browser.

That said, even though I still build SPAs at work, but I can't wait for the day that I get to build something big with Django & htmx.

Re: Django 6

#116
post #62

Earlier quoted context omitted.

Ruby and Rails are even better candidates. CSP, Background workers, and many other features that Django still lacks have been standard offerings for sometimes 10+ years!

Rails tries to more tightly integrate with the front-end which causes a lot of turn over the years. Django projects from 10 years ago are still upgradable in a day or two. Rails does include some nice stuff though, but I much prefer Django's code first database models than Rail's ActiveRecord.

I do agree that Rails' asset stuff has been giant pain over the years and has not kept up well. On the other hand, some apps that adopted separate Rails APIs and a separate (for example, React) frontend have been fine. You're right though that their opinion here added more headaches that necessary!

Re: Django 6

#117
post #77
post #30

Earlier quoted context omitted.

Django + AlpineJS + HTMX is pretty nice.

That's just for the HTML content though. What if you want to add some non-trivial Javascript or generated CSS? Or maybe you want to integrate a frontend tool like Storybook[0] even if your HTML is rendered server-side? Maybe add some tests for your frontend code? There is much more between raw hand-rolled HTML/CSS/JS and a full-blown SPA. At my day job we use Django with HTMX and Alpine, but we also generate the cust…

[dead]

Re: Django 6

#118
post #110

Congrats to the Django team! If anyone is curious, I've been maintaining a Docker Compose based Django + Celery + Postgres + Redis + esbuild + Tailwind starter app for years and just updated it for Django 6.0 at https://github.com/nickjj/docker-django-example . The only thing I haven't done is pre-configure the new CSP settings because I want to let that marinate a bit before putting it in as a default.

All of Nick's repos are top notch and I high recommend them and reference them from my materials as well.

Nick, thank you for sharing so much in the open.

Re: Django 6

#119
post #102
post #96

Earlier quoted context omitted.

That’s true as long as you are only talking about the backend. Frontend wise, Django is in the Stone Age. Look at Laravel or rails if you want a really complete full stack solution.

I feel very comfortable with Django on the frontend, what are you missing there? I usually use Tailwind or Bulma, with HTMX and AlpineJs. I feel like the experience can be very much React like, even if you leave out HTMX. The frontend game of Django really changed about 2 years ago (at least for me).

Laravel's Blade templates are just absolutely phenomenal. The partial rendering, the integration with Livewire, the first class component paradigm. It's just far beyond stock Django / Jinja at this point and delivers some serious dev experience performance boosts.

https://laravel.com/docs/12.x/blade

Re: Django 6

#120
post #73

Django has been one of the biggest reasons why web development has been so enjoyable to me. Whenever I switched to something else, I just felt too spoiled by everything that Django gives you. So I always ended up back with Django, and have no regrets at all specializing deep down that path.

Have you tried Ruby on Rails. That's my experience with Rails. Everytime I've tried something else (for web dev), I just felt too spoiled with Ruby & Rails and went back. This includes Django and Phoenix (Elixir). Edit: The only thing that Rails lacks is a decent Admin UI included as part of Rails. I know that there are some external gems that can be used, yet that's something that should be part of the framework in…

Even before you get to the lacking Admin UI, the first thing Rails asks me to do is implement authentication. Coming from a true batteries-included framework like Django that feels like a complete non-starter.
Post reply on HN