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

What's new in Django 1.9

52654cfef40a0579cb31843b01ba49bc?s=47 Marc Tamlyn
October 20, 2015

What's new in Django 1.9

52654cfef40a0579cb31843b01ba49bc?s=128

Marc Tamlyn

October 20, 2015
Tweet

More Decks by Marc Tamlyn

Other Decks in Technology

Transcript

  1. What's new in Django 1.9 Parallel permission passwords?

  2. Django 1.9 • Beta 20th October • RC mid Nov

    • Final early December • PLEASE TEST
  3. Password validation • Opt-in AUTH_PASSWORD_VALIDATORS • Min length, common passwords,

    user similarity, non-numeric • Framework for your own password validation logic
  4. Password validation class PasswordValidator(object): def __init__(self, **kwargs): pass def validate(self,

    password, user=None): if condition(password): raise ValidationError(…) def get_help_text(self): return "Your password must be…" def password_changed(password, user=None): # check not the previous password
  5. Permission Mixins • Similar django-braces and decorators • AccessMixin, LoginRequiredMixin,

    PermissionRequiredMixin, and UserPassesTestMixin
  6. Parallel tests • ./manage.py test --parallel • Separate process and

    database for each core • Requires tblib • Does not work with Windows or Oracle
  7. On commit hook • transaction.on_commit(func) • Executes func when the

    current transaction commits • Good for queueing tasks or email notifications
  8. New admin theme

  9. ORM • JSONField • GDALRasters • Expressions in save() •

    Greatest, Least, Now • Transform and Func unified
  10. Forms • CharField now strips whitespace by default • Unicode

    slug support • Field ordering
  11. CLI • python -m django • --noinput has --no-input alias

  12. Testing • response.json() • client.force_login(user)

  13. Deprecations and backwards incompatible changes • Python 3.2 and 3.3

    dropped • ForeignKey(model, on_delete) • Global timezone adaption • Relative Location header • Implicit __in removed
  14. Final removals • SortedDict • utils.unittest • syncdb • initial_data

    • old model loading • manage.py validate • .util modules • request.REQUEST • IPAddressField • import_by_path • FastCGI support • {% url %} in future
  15. Django 1.10 ideas • Improved MSSQL support • Full text

    search • Custom indexes • Even more improved expressions • Async worker/communication layer • August 2016
  16. Marc Tamlyn @mjtamlyn photocrowd.com