Live data from Hacker News

Django 5.0

djangoproject.com

181–190 of 237 posts

Re: Django 5.0

#181

Earlier quoted context omitted.

Django Ninja just hit 1.0 a few weeks ago. I think you are going to have to be patient to find large sites using it in production.

I've never heard of anyone using it in production, period. The one thing FastAPI had going for it back when it was announced was a list of companies and groups with it deployed that minute. Is it a "1.0 because we think it's done and you should try using it now. Maybe it'll work." Or "This is a solid 1.0 that has been tested in production. You can expect reasonable api stability." FastAPI launched with option three:…

It is 1.0 only because of supporting pydantic 2.0. It's not 1.0 because it's done and you should try to use it. In fact, 1.0 is unstable I don't recommend upgrading if you are running django ninja in production

Re: Django 5.0

#182

Earlier quoted context omitted.

> The builtin admin system is also a pretty decent CMS on its own (...) It's wise to get off the builtin admin system as your project grows. And go to another superbly robust and easy to use actual CMS: wagtail.

Wagtail is absolutely fantastic for content-heavy websites, like blogs, journals, catalogues, archives, venues (event schedules), also everything that deals with loosely-structured data. It's much less useful as a general purpose CRUD framework - it's too focused on "content", it wouldn't spark joy. Also it's been a few years since I've last used it, but the overwhelming dominance of deeply nested JSON fields makes o…

> it's too focused on "content".

Isn't that a good thing for a Content Management System?

I am not sure I understand what you think could be done to either the admin (or wagtail) to make them "CRUD frameworks".

Re: Django 5.0

#183
post #52

Django made me fall in love with programming 13 years ago, and since then it has always had a special place in my heart. I’m revisiting a business idea I was working on for a couple years, before I sought and found employment in the industry (where I used Java for a couple years, then Elixir for a couple more). My project was built with Django and Django REST Framework, and Ember on the client-side. 6 years later, th…

I absolutely agree. Recently I had to work on a complex client app, and I could simply not believe the amount of trouble you have to go through when you want to increment the version number of things like React, MUI, webpack, TS by.. one!

> want to increment the version number of things like React, MUI, webpack, TS by.. one!

To be fair, in semver that means a breaking change of some sort.

Re: Django 5.0

#184
post #6

What's the preferred Python Web Framework these days? I've read a lot of love for Litestar (formerly Starlite), since it seems people prefer it over FastAPI, Flask, etc. https://litestar.dev Or is the preferred web framework still Django?

Have been a big Django user over the past 10 years at my startups, but we decided to do all new projects in Litestar going forwards - typing, async, and a better REST API story made it the preferred choice for us.

Re: Django 5.0

#185

Earlier quoted context omitted.

I've never heard of anyone using it in production, period. The one thing FastAPI had going for it back when it was announced was a list of companies and groups with it deployed that minute. Is it a "1.0 because we think it's done and you should try using it now. Maybe it'll work." Or "This is a solid 1.0 that has been tested in production. You can expect reasonable api stability." FastAPI launched with option three:…

It is 1.0 only because of supporting pydantic 2.0. It's not 1.0 because it's done and you should try to use it. In fact, 1.0 is unstable I don't recommend upgrading if you are running django ninja in production

There we go! Thanks, that’s the sense I got.

Re: Django 5.0

#186
I loooove Django, any project that I work on that isn't Django causes me to yearn for it greatly. However, there's two things that have been minorly bothering me about it:

- The complete lack of any motivation to support type hints (yes I know about stubs and the other 3rd party).

- The GraphQL situation is a mess. Graphene on again off again development and Strawberry being not quite all the way stable yet sucks compared to how baller DRF is. It's still a massive fight to get subscriptions working well. It would be nice to see the foundation throw them a bone like they did with Channels.

Re: Django 5.0

#187

I can’t tell if it’s Django or just how I use it—-I’m a mechanical engineer by training and only dabble on web dev—-but I deeply appreciate how it gives me enough abstraction to get going but doesn’t get too far ahead of itself. If I go away for a year or two then come back I still get what’s going on. Meanwhile anything I try on JS land has gone through a few half-lives.

If you want a similar experience in JS check out Joystick [1]. It's being built to mimic the indefinitely stable design of stuff like Django and Rails. [1] https://github.com/cheatcode/joystick

Which is just yet another js framework which might disappear next month.

That's the problem.

Re: Django 5.0

#188

A huge part of the work I did the past year (and still do sometimes, email in my profile) was helping people transition from a full legacy django app to a lightweight django backend with rest api and a react frontend. Django Ninja makes it especially pleasant. I think django should really embrace this in the future. Make it easier to drop the superfluous parts; forms, templates … I don’t know what that will look like…

What do people like torturing themselves by duplicating code. Wouldn't it be easier to just use node all the way. Writing hundreds of lines of JS to display a Table list, instead of HTML sprinkled with some JS

A whole stack rewrite is not always (in fact very rarely) a good idea. The backend often drives a lot of logic; in a big rewrite, the less you rewrite the more likely you are to be successful.

Too many big refactors fail because they aren’t done in value-adding steps.

Also your second paragraph isn’t in line with your first … in react you don’t write “hundreds of lines of js” for a table. You write the html as js (jsx), and sprinkle the dynamic parts on top. It’s equivalent…

Re: Django 5.0

#189

3 years ago I moved to fast growing startup that was founded with fast api slap-dashed together. I jammed Django down their throats and I can safely say it was the best decision we made as an Org. The teams using Django are far far more productive than the others. When a product I think is going to need users and roles and permissions, I grab Django off the shelf and never look back. Thank you mister reinhardt

Yeah this is definitely Django's strength - it has a lot of the stuff you're probably going to need already implemented. Massive time saver when you're setting things up. Python definitely holds it back though. Does it have type hints yet?

Why do you say python holds it back?

Re: Django 5.0

#190
post #23

Django seems great but also incredibly complex. I am never able to find any good example projects that use it with react and aren't just a toy which is bit of a bummer, because I think that would be a great stack.

Django makes it dead easy to take a URL route and return HTML. Obviously there's some fussing to add a script tag that points at your JavaScript file, but what exactly are you looking for beyond that? I'm not exactly sure what you're looking for beyond that (as someone who ~only writes Django+React); that's kind of it. There's no big magic, it responds to http requests with data.

For a full-on SPA (which I'm assuming is what they mean by "and aren't just a toy"), you'd also need at least frontend routing and an example how to make that play nice with Django URL routes, probably a data store (which at this point I think is just going to be redux), and most of the Django views would return JSON instead of HTML.
Post reply on HN