Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What's new in Django 1.5

What's new in Django 1.5

Slides from talk at DJUGL in March 2013

Marc Tamlyn

March 12, 2013
Tweet

More Decks by Marc Tamlyn

Other Decks in Programming

Transcript

  1. Major Changes • Pluggable User models • Python 3 •

    Security Improvements • StreamingHTTPResponse • {% url %} tag • ... and much more Wednesday, 13 March 13
  2. Pluggable User Model • Does what it says on the

    tin! • Solution to schema changes on the default user model • AUTH_PROFILE_MODEL becomes AUTH_USER_MODEL Wednesday, 13 March 13
  3. Pluggable User Model • auth.models.AbstractUser • auth.models.PermissionsMixin and auth.models.AbstractBaseUser •

    USERNAME_FIELD • contrib.admin integration • External apps Wednesday, 13 March 13
  4. Python 3 • Python 3.2 and 3.3 supported • Not

    yet “production ready” • Upgrade your third party apps! • Caveats: MySQL, PIL, Selenium (etc.) • (Python 2.5 gone) Wednesday, 13 March 13
  5. Security • ALLOWED_HOSTS • Backported to 1.3.X and 1.4.X, but

    required in 1.5 • Yes it’s boring Wednesday, 13 March 13
  6. {% url %} • Fixed in 1.3 with load from

    future • Old style actually gone now • If you’ve not been using it, the first thing you’ll notice breaking! Wednesday, 13 March 13
  7. More New Things • Caching of related model instances •

    update_fields • PostGIS 2.0 • {% verbatim %} Wednesday, 13 March 13
  8. Backwards Incompatibilities • Context in various class based views •

    simplejson • Session not saved on 500 • Testing: - OPTIONS, PUT and DELETE - DB flushing - No sequence reset - Ordering of test execution changed Wednesday, 13 March 13
  9. Nice things you may have missed • LOGIN_URL can be

    a url name • True, False and None in templates • OPTIONS requests to CBVs • user_login_failed signal • assertXMLEqual() • index_together Wednesday, 13 March 13
  10. Nice things you may have missed • Admin list filters

    customisable by request • cleaned_data on invalid forms • django.utils.text.slugify Wednesday, 13 March 13