Live data from Hacker News

Django 4.0 release candidate 1 released

djangoproject.com

11–20 of 126 posts

Re: Django 4.0 release candidate 1 released

#11
post #5

Last week I was trying develop a quick prototype, and instead of setting up a C# project, I tried Django. At first, everything seemed super easy, but later I hit so many road-blocks that I had to give up (For example defining a self-referential m2m relationship with a custom join table, and getting it working on the admin site). Don't people really have such problems with it? It really feels like a huge burden when y…

There's a "through" argument for the ManyToManyField that allows you to specify a custom model to track relationships.

Then there's InlineModelAdmin that allows you to integrate your relationships in the admin.

You gave up instead of reading the docs.

Re: Django 4.0 release candidate 1 released

#12
post #5

Last week I was trying develop a quick prototype, and instead of setting up a C# project, I tried Django. At first, everything seemed super easy, but later I hit so many road-blocks that I had to give up (For example defining a self-referential m2m relationship with a custom join table, and getting it working on the admin site). Don't people really have such problems with it? It really feels like a huge burden when y…

What do you mean with custom join table? Self-referential m2m works fine im my experience.

Re: Django 4.0 release candidate 1 released

#13
post #8
post #5

Last week I was trying develop a quick prototype, and instead of setting up a C# project, I tried Django. At first, everything seemed super easy, but later I hit so many road-blocks that I had to give up (For example defining a self-referential m2m relationship with a custom join table, and getting it working on the admin site). Don't people really have such problems with it? It really feels like a huge burden when y…

When you're a Django beginner, yes, it can be annoying to go from something that's just super easy to having to stitch together something yourself. I'm not sure what exactly causes this feeling, but I did learn that you need to have the right perspective on some things and either let it go or find some other way. For instance, in my experience the admin site is best thought of as glorified DB UI. If you need somethin…

> either let it go or find some other way.

With Django as soon as I have anything to do with a database I seem to hit this with the ORM. So I start working around it. Next thing you know it all seems to fall apart because of how coupled the rest of the application is to Django's assumptions about views and entities in the DB.

So "You gave up instead of reading the docs.": I go back to flask, or recently FastApi where you have to figure your schemas and access patterns out for yourself in advance instead of building thorough and deep knowledge on how to deactivate parts of Django when they become redundant. Opinion my own, results may vary, IANA your dev, etc

Re: Django 4.0 release candidate 1 released

#14
post #7

There are cooler frameworks, there are more minimal frameworks, there are more "modern" frameworks. Whatever that means. Yes I would like to work with FastAPI, it is great. But... Django gets the shit done. There are plenty of developers to find for it. Lots of good quality plugins. Every problem you have, infrastructure wise, is often already solved and there is a blog post of it. Its good parts and its bad parts ar…

I end up spending more time writing the CSS than the Django...

Re: Django 4.0 release candidate 1 released

#15
post #5

Last week I was trying develop a quick prototype, and instead of setting up a C# project, I tried Django. At first, everything seemed super easy, but later I hit so many road-blocks that I had to give up (For example defining a self-referential m2m relationship with a custom join table, and getting it working on the admin site). Don't people really have such problems with it? It really feels like a huge burden when y…

OT, but how do you feel C# (w/ ASP and EF, I suppose?) stacks up in productivity and TTM? What's the kind of problem you run into where you start feeling like you're not working on the domain but on side details?

Re: Django 4.0 release candidate 1 released

#16
post #8
post #5

Last week I was trying develop a quick prototype, and instead of setting up a C# project, I tried Django. At first, everything seemed super easy, but later I hit so many road-blocks that I had to give up (For example defining a self-referential m2m relationship with a custom join table, and getting it working on the admin site). Don't people really have such problems with it? It really feels like a huge burden when y…

When you're a Django beginner, yes, it can be annoying to go from something that's just super easy to having to stitch together something yourself. I'm not sure what exactly causes this feeling, but I did learn that you need to have the right perspective on some things and either let it go or find some other way. For instance, in my experience the admin site is best thought of as glorified DB UI. If you need somethin…

> For instance, in my experience the admin site is best thought of as glorified DB UI. If you need something more than what it can offer out of the box, you should switch to coding it yourself, or live with a quick hack.

Agreed. My biggest Django headaches ultimately resulted from me trying to make the admin console do more than it's meant to do.

Re: Django 4.0 release candidate 1 released

#17
post #13
post #8

Earlier quoted context omitted.

When you're a Django beginner, yes, it can be annoying to go from something that's just super easy to having to stitch together something yourself. I'm not sure what exactly causes this feeling, but I did learn that you need to have the right perspective on some things and either let it go or find some other way. For instance, in my experience the admin site is best thought of as glorified DB UI. If you need somethin…

> either let it go or find some other way. With Django as soon as I have anything to do with a database I seem to hit this with the ORM. So I start working around it. Next thing you know it all seems to fall apart because of how coupled the rest of the application is to Django's assumptions about views and entities in the DB. So "You gave up instead of reading the docs.": I go back to flask, or recently FastApi where…

Flask with something like Flask-Security or Flask-Admin is my go-to

Re: Django 4.0 release candidate 1 released

#18
post #7

There are cooler frameworks, there are more minimal frameworks, there are more "modern" frameworks. Whatever that means. Yes I would like to work with FastAPI, it is great. But... Django gets the shit done. There are plenty of developers to find for it. Lots of good quality plugins. Every problem you have, infrastructure wise, is often already solved and there is a blog post of it. Its good parts and its bad parts ar…

While I have no experience with Django, this could exactly be said about Rails. It's great these two exist and are being worked on for so long and have this level of maturity.

Re: Django 4.0 release candidate 1 released

#19
post #7

There are cooler frameworks, there are more minimal frameworks, there are more "modern" frameworks. Whatever that means. Yes I would like to work with FastAPI, it is great. But... Django gets the shit done. There are plenty of developers to find for it. Lots of good quality plugins. Every problem you have, infrastructure wise, is often already solved and there is a blog post of it. Its good parts and its bad parts ar…

agreed, I'm more convinced now that django is really enough and get shit done even if there a poor support of async, more convinced after reading this blog post that async python is not faster (was on hn) : https://calpaterson.com/async-python-is-not-faster.html

It's not significantly faster (or slower), it's the author that doesn't know how to run a benchmark. You can read my take on his take [0].

Leaving that aside, async is very advisable (even a must) if your backend throws requests against external and potentially blocking services and you want to keep answering your own clients without scaling for no reason.

[0]https://news.ycombinator.com/item?id=29128107

Re: Django 4.0 release candidate 1 released

#20

Earlier quoted context omitted.

agreed, I'm more convinced now that django is really enough and get shit done even if there a poor support of async, more convinced after reading this blog post that async python is not faster (was on hn) : https://calpaterson.com/async-python-is-not-faster.html

It's not significantly faster (or slower), it's the author that doesn't know how to run a benchmark. You can read my take on his take [0]. Leaving that aside, async is very advisable (even a must) if your backend throws requests against external and potentially blocking services and you want to keep answering your own clients without scaling for no reason. [0] https://news.ycombinator.com/item?id=29128107

> if your backend throws requests against external (and potentially blocking) services and you have the "audacity" of wanting to keep answering your clients.

If you have enough processes/threads running, the CPU scheduler should take care of that , no?

Post reply on HN