Live data from Hacker News

Django 2.2

djangoproject.com

141–150 of 257 posts

Re: Django 2.2

#141
Why Django is not good, here are some of my reasons as far as I can remember:

1. mediocre routing (no nesting, all routes have to be declared in one place)

2. mediocre middleware (middleware is global)

3. mediocre ORM (easy only for very easy stuff, more pain in the ass than writing raw SQL itself when it comes to complex aggregations and joins) not to mention some of the famous ORM bugs that have been open for like a decade

4. custom user model? good luck fighting with Django errors to make that happen

5. custom authentication? external authentication? want a custom token format? want your authentication token in a custom http header? good luck

6. Django is built for 2000s websites not REST/gRPC era

7. want to use graph databases? noSQL? good luck

8. external migration for SQL? oh god, prepare yourself for the mental hell

9. Django as far as I can tell still ONLY supports decoding "x-www-form-urlencoded" bodies, yeah no JSON, it's that pathetic

Re: Django 2.2

#142

Earlier quoted context omitted.

I feel the same way. Does any one have a good overview on how the community actually separates functionality into “apps”? I have been looking at a rails like framework in python called Masonite. Does anyone in the python/Django community think this will gain traction?

> Does any one have a good overview on how the community actually separates functionality into “apps”? For the most part there isn't any need to, with the exception of things explicitly meant to be shared. So if you are a large company and want a bunch of custom auth logic or something to be shared among many different teams running their own Django service, then you might want to build that as an app. Or else if you…

> until you have too many models to comfortably fit into one file. That might not be until 20KLOC.

Even for larger apps in my django project, I convert my models into a package and split all my models into individual files (same with views and serializers for DRF). This keeps my models easier to manage.

Re: Django 2.2

#143

Earlier quoted context omitted.

I feel the same way. Does any one have a good overview on how the community actually separates functionality into “apps”? I have been looking at a rails like framework in python called Masonite. Does anyone in the python/Django community think this will gain traction?

> Does any one have a good overview on how the community actually separates functionality into “apps”? For the most part there isn't any need to, with the exception of things explicitly meant to be shared. So if you are a large company and want a bunch of custom auth logic or something to be shared among many different teams running their own Django service, then you might want to build that as an app. Or else if you…

Apps can be a good way to generalize a set of classes for reuse in other projects. For instance we put auth into an app so if we fire up other projects we don’t have to rewrite auth.

Re: Django 2.2

#144
post #124

Earlier quoted context omitted.

> Living in society today involves having others' political views forced on me every day Yes to some extent. Most secular and democratic societies has agreed to a standard that I defend. Call it status quo if you want. I think decisions like Djangos goes against that standard and is probably why I feel so strongly about this. They want to police speech and force everyone to use specific words. I don't think we should…

It feels to me, that people don't realize that there are probably a lot more people out there who speak English not as their first language, hence they don't have the same connotations of many words as the native speakers. When I hear Django for example, first thing I think of is the slave from the "Django Unchained" Tarantino movie (or Django Reinhardt, the gypsy musician)... Maybe this web framework shouldn't name…

> or Django Reinhardt, the gypsy musician

Well, that's precisely who the framework is named after...

https://docs.djangoproject.com/en/2.1/faq/general/#what-does...

Re: Django 2.2

#145
post #138
post #133

Earlier quoted context omitted.

I made 9 arguments and you claim I am not even trying? good luck with your career, if you have any

Could you please stop? Flamewars are just what we're trying to avoid on HN. When accounts behave like this we eventually have to ban them. https://news.ycombinator.com/newsguidelines.html

I am not trying to start any flamewar, I am just stating why Django is not good imo, simple as that

Re: Django 2.2

#147
This release includes the Watchman based reloader I worked on for about a year. It turns out auto reloading in Python is not an easy task, and I’m really nervous about edge cases I haven’t considered!

I’ve actually had a nightmare where everyone’s auto reloader was broken. While it never runs in production (right?!) it’s actually a pretty critical bit of Django that had not been touched in about 10 years!

Re: Django 2.2

#148

I love Django. I've used it for the last 8 years. I'm happy to see the project is still thriving. At this point, for me Django is pretty much synonymous with Django REST framework ( https://www.django-rest-framework.org/ ). I can't imagine a better API than Django w/ REST framework. For static sites I use Django's templates. Otherwise, I just use Django w/ REST framework for my API, and to serve up index.html. My ind…

I do wish Django REST Framework shipped with faster serializer code.

You can use Serpy for that, although it will require some hacking for deserialization (a previous client of mine had a custom-built solution that used Serpy for responses but plain Form classes for parsing requests, but that seemed fine and they were handling 3k/requests per second at peak time).

Re: Django 2.2

#149

What I find most curious about Django/Python is that about 30% of the new installs are for legacy Python/Django (2.7/1.11): $ pypinfo --start-date 2019-01-01 --end-date 2019-03-31 -- percent --markdown django pyversion Served from cache: False Data processed: 160.22 GiB Data billed: 160.22 GiB Estimated cost: $0.79 | python_version | percent | download_count | | -------------- | ------: | -------------: | | 3.6 | 39.…

Many many organizations are acting as if completely unaware of the EOL.

I assume they will simply run on the last 2.7 release until projects are shut down.

Re: Django 2.2

#150

Earlier quoted context omitted.

I feel the same way. Does any one have a good overview on how the community actually separates functionality into “apps”? I have been looking at a rails like framework in python called Masonite. Does anyone in the python/Django community think this will gain traction?

As a Django enthusiast and python programmer, I often want less magic from Django, not more. This makes pyramid or flask seem tempting to me. If I wanted Rails that badly, I would simply port my code to Ruby.

Django is supposed to be the “Rails” of Python, allowing programmers who want a Rails-like experience to continue using Python instead of switching languages completely.

If you don’t want “magic” then your solution is right - just use Flask.

Post reply on HN