Live data from Hacker News

Django 2.2

djangoproject.com

81–90 of 257 posts

Re: Django 2.2

#81

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

I wouldn't call it "new installs" - most of the PyPI downloads in any category are going to be from deployment scripts.

It shows that 30% of projects being re-deployed are still on Python 2.7.

Re: Django 2.2

#82

The projects/app relationship never 'clicked' with me. I also have a dislike for the awkward 'polls' example in the django tutorial. That said, I like Django. Of course, I liked Rails better, but maybe that's because it was my 'first' and I never used any of the big php frameworks for a long period of time. I quit wasting my time with Flask for projects a while ago. It's a really great project and suited for smaller…

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 were building something as an open source project you might want to do the same.

In terms of separating apps by functionality, I think the main reason many people do it is because they are under the mistaken impression that putting things into different apps will make them magically re-usable. That's not to say you shouldn't do it, only that I think most people do it for the wrong reasons.

In general I would say don't bother splitting up your project into different apps by functionality until you have too many models to comfortably fit into one file. That might not be until 20KLOC. For apps that are less than 10KLOC, I think in most cases the overhead probably outweighs the benefits.

There isn't really any hard rule one how to do this, but you might do something like:

- Account management app for creating and deleting users, getting user profiles, password resets, etc.

- Apps for integrations with third-party APIs, e.g. Duns or Mailgun.

- Apps for different front doors, e.g. if you make a Facebook chat bot that's powered by the same tech that powers your normal website.

And then after that you can possibly split up your business logic of your core website into different logical components, but I would do that last. By the time you get there you should start to have a feel for how to do this.

The one place I use it for our own startup is that we recently built a couple different front doors for our site, and each one accepts data in a slightly different format and has different authentication requirements. I put each of these in their own apps, but everything else is just in one main app.

Re: Django 2.2

#83

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

Aren't there a ton of legacy 2.7 programs installed onto OS's that then probably download 2.7 to work?

e.g. some script has '$python my_program --arg foo' hardcoded instead of '$python3 my_prgram --arg foo'

Re: Django 2.2

#85
Whenever I see people still praising Django in 2019, I immediately know that their technical understanding of the current backend and ops technologies is years behind. Django is still okay for small and amateur projects but nothing more than that. It is a curse for a fast moving business.

EDIT: even though I stopped writing Django for 3 years now but 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? 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

Django is very intrusive and is pain in the ass in a fast moving environment where you want to use microservices, external authentication/authorization, APIs, gRPC, etc... that's excluding all problems of Python itself. I totally recommend Typescript/Express or Golang for doing any kind of non trivial backend with fast moving environment/requirements currently

Re: Django 2.2

#86
post #85

Whenever I see people still praising Django in 2019, I immediately know that their technical understanding of the current backend and ops technologies is years behind. Django is still okay for small and amateur projects but nothing more than that. It is a curse for a fast moving business. EDIT: even though I stopped writing Django for 3 years now but here are some of my reasons as far as I can remember: 1. mediocre r…

What do you suggest?

Re: Django 2.2

#87

Earlier quoted context omitted.

What politics do they enforce on me by using their products?

Free software is a political movement. Calling it “free” was a political choice to convince people that proprietary software is “unfree”. I really don’t know where to begin explaining this...

Well yes, but they are not policing speech as far as I know. I have nothing against people/projects being political, it's when a specific political view that I do not agree with gets enforced upon me that the issue arises.

Re: Django 2.2

#88
post #85

Whenever I see people still praising Django in 2019, I immediately know that their technical understanding of the current backend and ops technologies is years behind. Django is still okay for small and amateur projects but nothing more than that. It is a curse for a fast moving business. EDIT: even though I stopped writing Django for 3 years now but here are some of my reasons as far as I can remember: 1. mediocre r…

Would you mind sharing some more precise reasoning with regards to this statement?

Re: Django 2.2

#89
post #85

Whenever I see people still praising Django in 2019, I immediately know that their technical understanding of the current backend and ops technologies is years behind. Django is still okay for small and amateur projects but nothing more than that. It is a curse for a fast moving business. EDIT: even though I stopped writing Django for 3 years now but here are some of my reasons as far as I can remember: 1. mediocre r…

As opposed to?

Re: Django 2.2

#90
post #85

Whenever I see people still praising Django in 2019, I immediately know that their technical understanding of the current backend and ops technologies is years behind. Django is still okay for small and amateur projects but nothing more than that. It is a curse for a fast moving business. EDIT: even though I stopped writing Django for 3 years now but here are some of my reasons as far as I can remember: 1. mediocre r…

Would you mind sharing some more precise reasoning with regards to this statement?

Don’t bother, the poster doesn’t follow up his/her posts with any information backing up their statements or claims.
Post reply on HN