Kalil de Lima - Python Meetup 2019
github.com/kaozdl
kalil.de.lima@fing.edu.uy
kalil@rootstrap.com
April 2017 - Django 1.11
Last version to support Python 2
Full fledged web framework for python
First version is from 2005
Implements the MVT pattern
Powerful ORM
Wide library ecosystem
Great defaults
Easily customizable
In April of 2017 Django shipped version 1.11 - LTS
This was the last version of django which included support for python 2.7
After that the community started to work in a new major release of the framework.
path function in django.urls
Responsive admin
values_list can now return named tuple
earliest, latest now accept multiple args
squashmigrations now allows to name the squashed migration
inspectdb now instrospects JSONFields in postgres
view permission allows read only access to models
createsuperuser now allows bypassing password validations
BooleanField now accepts null=True NullBooleanField discouraged
The new Queryset.explain() method shows db execution plan
Constraints
ignore_conflicts argument for Queryset.bulk_create
New Queryset.bulk_update method
Smarter single query transaction policy
request.headers attribute
Performed at database level
Require a migration
Method independent
Work nicely in batches
Multiple objects created per query
ignore_conflicts parameter
Does not handle many-to-many cases
Objects need to be
handled in memory
Updates several objects
in a single query
Extra queries for multi-table inheritance
Objects need to be
handled in memory