This document summarizes the key changes and new features in Django 1.6, which was released in November 2013. Some of the major changes included a simpler project layout with fewer generated files, improved transaction handling with new atomic APIs, and the ability to reuse database connections between requests through the new CONN_MAX_AGE setting. Other additions were custom templates for projects and apps, more timezone awareness in querysets, and several performance improvements. The document provides details on each new feature and change and notes some deprecated functionality as well.
36. DB Level Auto Commit
• Enabled by default
• Every single SQL Statement is committed immediately
• django.db.transaction.set_autocommit()
Transactions – New APIs
37. atomic()
• New Single API to control DB transactions
• Commit on Success
• Rollback on Exceptions
• It can be
• Nested
• Used as a Decorator & Context Manager
Transactions – New APIs
43. Till Django 1.5
New Connection for every
HTTP Request
Persistent DB Connections
44. In Django 1.6
Same Connection will be
reused between requests
Persistent DB Connections
45. CONN_MAX_AGE
•
•
•
•
•
Life Time of a Database Connection
Different for each Database
Default = 0 (Off & No reuse)
For Unlimited, use None
Comply with DB Idle Connection Settings
Persistent DB Connections
46. Processing Behavior
•
•
Connection is established during the first query
Connection won’t be closed and reused for subsequent
requests
One Connection for each Worker Thread
Once it is exceeds the CONN_MAX_AGE, it will be closed
•
•
•
Beginning & end of each request
Persistent DB Connections
63. •
•
•
•
•
SQLite Save Points is supported
Open Layer based GeoDjango Forms API
Pillow is preferred over PIL for ImageField
Django Admin jQuery is upgraded from 1.4.2 to 1.9.1
New Deployment Check List (https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/)
65. •
•
•
UNUSABLE_PASSWORD is removed (is_password_usable)
MAXIMUM_PASSWORD_LENGTH is removed in the latest security fix
Password reset now uses Base64 Encoding (earlier it was base36)
•
•
•
BooleanField is not default to False (None). Be Explicit
django.db.models.query.EmptyQuerySet can’t be instantiated
django-debug-toolbar is breaking