Slide 1

Slide 1 text

What's new in Django 1.9 Parallel permission passwords?

Slide 2

Slide 2 text

Django 1.9 • Beta 20th October • RC mid Nov • Final early December • PLEASE TEST

Slide 3

Slide 3 text

Password validation • Opt-in AUTH_PASSWORD_VALIDATORS • Min length, common passwords, user similarity, non-numeric • Framework for your own password validation logic

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

Permission Mixins • Similar django-braces and decorators • AccessMixin, LoginRequiredMixin, PermissionRequiredMixin, and UserPassesTestMixin

Slide 6

Slide 6 text

Parallel tests • ./manage.py test --parallel • Separate process and database for each core • Requires tblib • Does not work with Windows or Oracle

Slide 7

Slide 7 text

On commit hook • transaction.on_commit(func) • Executes func when the current transaction commits • Good for queueing tasks or email notifications

Slide 8

Slide 8 text

New admin theme

Slide 9

Slide 9 text

ORM • JSONField • GDALRasters • Expressions in save() • Greatest, Least, Now • Transform and Func unified

Slide 10

Slide 10 text

Forms • CharField now strips whitespace by default • Unicode slug support • Field ordering

Slide 11

Slide 11 text

CLI • python -m django • --noinput has --no-input alias

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

Django 1.10 ideas • Improved MSSQL support • Full text search • Custom indexes • Even more improved expressions • Async worker/communication layer • August 2016

Slide 16

Slide 16 text

Marc Tamlyn @mjtamlyn photocrowd.com