Live data from Hacker News

Django 3

docs.djangoproject.com

191–196 of 196 posts

Re: Django 3

#191
post #188

Zulip has been powered by Django since the very early days of its development with Django 1.4, back in 2012. As a reasonably mature web application with significant scale, we're at the stage in many companies' development where one starts to rip out more and more of the web framework to optimize things or just make them work the way we want. (E.g. while I was at Dropbox in early 2016, we discovered we only had about…

> My only frustration with this release announcement is dropping Python 3.5 support now. Because Python 3.5 is not EOL and used in LTS OS releases that have vendor support through 2021, this forces us to choose between our policy of supporting vendor OS releases until they reach EOL, not upgrading to Django 3 for the next year or more, or shipping our own Python on Ubuntu Xenial. Don't ever rely on python that is inc…

And you can assume that no security issues have entered python no matter which version? People use the OS version for security audit reasons.

Re: Django 3

#193
post #182

Earlier quoted context omitted.

As someone that knows SQL I find that the ORM enables me to have decent queries rather then getting in the way.

I don't know what kind of operations you're doing, but I started having issues for anything that's not trivial. Perhaps those are achievable, but then in addition to knowing SQL I also need to know ORM (which is also different per language) Some things: - to make my application scalable I want two endpoints one that is read only, that goes to replicas and one that goes to master for modification. That way in my appli…

> Those are very simple things, but I'm also curious how you can do some advanced operations like group by having, window functions, CTEs, aggregate functions that return JSONB structure (so you don't have to send duplicate data and avoid N+1 queries). How do you use PostGIS?

You don't! That is not what an ORM is for. Use SQL. Any decent ORM with allow you to integrate SQL.

Check out the Fluent (query builder) and Eloquent (ORM) from Laravel. They allow all the features you want.

Re: Django 3

#194
post #188

Earlier quoted context omitted.

> My only frustration with this release announcement is dropping Python 3.5 support now. Because Python 3.5 is not EOL and used in LTS OS releases that have vendor support through 2021, this forces us to choose between our policy of supporting vendor OS releases until they reach EOL, not upgrading to Django 3 for the next year or more, or shipping our own Python on Ubuntu Xenial. Don't ever rely on python that is inc…

And you can assume that no security issues have entered python no matter which version? People use the OS version for security audit reasons.

The ius.io repo that I mentioned patches the version of Python. What it lets you do is you can install any major version you want (in fact you can install multiple at the same time and they won't conflict).

So you can chose whether you want python 3.5.x, 3.6.x, 3.7.x, 3.8.x or maybe still you want 2.7.x.

Re: Django 3

#195

Earlier quoted context omitted.

FastAPI generates specs from code, this generates code from specs

Just a bit of clarification: Pyotr does not generate any code, it uses the spec as configuration to construct the necessary routes at the app initialization, as well as to validate requests and responses.

Yeah didn't mean literary code generation, Python's dynamic nature makes such steps unnecessary.

In a way it feels kinda lispy (in a good way) to me, data is code, small DSL for working more efficiently with specific domain.

Re: Django 3

#196

Earlier quoted context omitted.

I use .values() and .values_list() to fetch raw records instead of objects. It still allows me to construct the query using the ORM which is nice.

I think that "ORM" is a bit of a misnomer for that. I'd call it "language-integrated query", if not for the potential confusion with LINQ (which stands for exactly that, not coincidentally).

> I think that "ORM" is a bit of a misnomer for that.

Good point: I'm no longer doing object mapping in that case. :) Though I think the most complicated part of the process that the Django "ORM" does for you is build the query. Maybe it should be called Django query generator.

Post reply on HN