Live data from Hacker News

Django 4.0 release candidate 1 released

djangoproject.com

31–40 of 126 posts

Re: Django 4.0 release candidate 1 released

#31
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.

I used Django for 4 years, their ORM is a mess imo. I wouldn't expect someone new to it to be able to discover how to do this after a couple of hours of reading.

Re: Django 4.0 release candidate 1 released

#32
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…

> 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.

There are certainly limitations to the admin console/module, but it is still rather amazing. The amount of stuff that it will allow you to do is pretty impressive.

Sure, you easily get into a situation where you're out of luck using the admin module, but there are also entire classes of problems that can be solved using only the build in admin functionality.

Re: Django 4.0 release candidate 1 released

#33

I love Django and have been using it for many many years. Lately, however, I’ve been finding it increasingly difficult not to be annoyed by some aspects of the developer experience. For example I’d choose React + Typescript over Django templates any time of the day.

> For example I’d choose React + Typescript over Django templates any time of the day.

What's stopping you? I use Django Rest Framework to write views and React + Typescript for the front end. Using templates is often way simpler, though.

Re: Django 4.0 release candidate 1 released

#34
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.

yes, they are very similar. I'm not sure if Rails has quite the level of auto-generating admin system, though.

Re: Django 4.0 release candidate 1 released

#35

Earlier quoted context omitted.

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.

yes, they are very similar. I'm not sure if Rails has quite the level of auto-generating admin system, though.

Probably better, just not in base.

Re: Django 4.0 release candidate 1 released

#36
post #31

Earlier quoted context omitted.

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.

I used Django for 4 years, their ORM is a mess imo. I wouldn't expect someone new to it to be able to discover how to do this after a couple of hours of reading.

That might be a matter of taste, or which ORM you've used previously. Personally I think it's the only sort of okay ORM, besides Go's sqlx, which is barely an ORM.

You do need to have the documentation handy, and writing efficient queries can be tricky, but it is the ORM that makes the most sense to me, and the easiest to get started with.

Re: Django 4.0 release candidate 1 released

#38
post #31

Earlier quoted context omitted.

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.

I used Django for 4 years, their ORM is a mess imo. I wouldn't expect someone new to it to be able to discover how to do this after a couple of hours of reading.

The ORM is great ... but is a question of taste/previous experiences. Once you start playing with annotations, DB-side functions and subqueries, it is very nice.

Only frustration I have is the power/possibilities of mysql (which I use 99% of the time for various reasons) versus postgre. The latter seems far better and advanced, and it does reflect in the ORM.

But wait, this isn't linked to django, is it? :-)

Re: Django 4.0 release candidate 1 released

#39
post #29

I love Django and have been using it for many many years. Lately, however, I’ve been finding it increasingly difficult not to be annoyed by some aspects of the developer experience. For example I’d choose React + Typescript over Django templates any time of the day.

Nothing stopping you from writing a Django app with parts written in React, VueJS or whatever you prefer.

Obviously nothing is stopping me, that's not the point. I was just highlighting the fact that in my opinion the DX of parts of Django is inferior compared to the JS frontend ecosystem. As the Django community, I think this is something we should have an eye on.

Re: Django 4.0 release candidate 1 released

#40

I love Django and have been using it for many many years. Lately, however, I’ve been finding it increasingly difficult not to be annoyed by some aspects of the developer experience. For example I’d choose React + Typescript over Django templates any time of the day.

Django templates are the worst.

Django is great. Just don't use its templates or form systems. Indeed react is a great replacement for both.

Post reply on HN