Django 1.11 beta 1 released
djangoproject.com
Django 1.11 beta 1 released
1–10 of 87 posts
Re: Django 1.11 beta 1 released
#2Re: Django 1.11 beta 1 released
#3Highlights:
- better support for creating indexes on your Models with class-based indexes
- widget rendering in forms now uses the templating system instead of python
- Explicit subquery expression support via Subquery and Exists expressions.
Re: Django 1.11 beta 1 released
#4Subquery expressions looks like it would be just easier to write SQL, instead of going through the Django ORM. This is where SQL starts to show its expressive strength over ORMs.
Re: Django 1.11 beta 1 released
#5Release notes with the new features in 1.11: https://docs.djangoproject.com/en/dev/releases/1.11/ Highlights: - better support for creating indexes on your Models with class-based indexes - widget rendering in forms now uses the templating system instead of python - Explicit subquery expression support via Subquery and Exists expressions.
- Long Term Support
- Last release to support Python 2
- Server side cursors for postgresRe: Django 1.11 beta 1 released
#6Subquery expressions looks like it would be just easier to write SQL, instead of going through the Django ORM. This is where SQL starts to show its expressive strength over ORMs.
There is definitely a benefit to querying everything the same way if you can, so that way it's easy to grep where different tables are being accessed. Cuts down on bugs, security issues, etc.
Re: Django 1.11 beta 1 released
#7Subquery expressions looks like it would be just easier to write SQL, instead of going through the Django ORM. This is where SQL starts to show its expressive strength over ORMs.
The way I define queries by using a custom language in the form of keyword arguments makes me wonder why I don't just learn SQL instead?
I would much rather do something like:
models.Foo.objects.filter(sql=my_sql_query_str)
Instead of something like: models.Foo.objects.filter(name='bar', parent__siblings__count__lt=3)
And no special abstraction on SQL in the form of special classes. Just a string of SQL that I compose with Python string formatting. SQL isn't scary. I don't see the need to try and hide it.Re: Django 1.11 beta 1 released
#8Subquery expressions looks like it would be just easier to write SQL, instead of going through the Django ORM. This is where SQL starts to show its expressive strength over ORMs.
Absolutely. The amount of "magic" Django does slowly became a real detractor for me. The way I define queries by using a custom language in the form of keyword arguments makes me wonder why I don't just learn SQL instead? I would much rather do something like: models.Foo.objects.filter(sql=my_sql_query_str) Instead of something like: models.Foo.objects.filter(name='bar', parent__siblings__count__lt=3) And no special…
you can already do this. the django ORM has a convenient and expressive API for a lot of very common types of queries, but lets you easily drop back into raw SQL when you have a high complexity query that you want to write by hand.
Re: Django 1.11 beta 1 released
#9Subquery expressions looks like it would be just easier to write SQL, instead of going through the Django ORM. This is where SQL starts to show its expressive strength over ORMs.
Absolutely. The amount of "magic" Django does slowly became a real detractor for me. The way I define queries by using a custom language in the form of keyword arguments makes me wonder why I don't just learn SQL instead? I would much rather do something like: models.Foo.objects.filter(sql=my_sql_query_str) Instead of something like: models.Foo.objects.filter(name='bar', parent__siblings__count__lt=3) And no special…
You can just add various filter conditions to a dictionary, and then unpack them into the filter as kwargs. That way you can still build up the dictionary using if/else blocks or however you would normally build up a SQL query string.
SQL isn't scary, but for simple queries the Django ORM usually a lot more legible if you take the time to learn the DSL.
Re: Django 1.11 beta 1 released
#10https://docs.djangoproject.com/en/1.10/ref/contrib/postgres/...