compare to user attributes ० common passwords ० not only numeric • Validators support additional options: ० e.g. change minimum length • Documentation: https://goo.gl/dCLxE3
UserPassesTestMixin from django.contrib.auth.mixins import PermissionRequiredMixin class MyView(PermissionRequiredMixin, View): permission_required = 'polls.can_vote' # Or multiple of permissions: permission_required = ('polls.can_open', 'polls.can_edit') • Documentation: https://goo.gl/qW5LaI • Taken from django-braces
with transaction.atomic(): transaction.on_commit(foo) with transaction.atomic(): transaction.on_commit(bar) • Documentation: https://goo.gl/BhXUsF • Taken from django-transaction-hooks
• keep_parents parameter to Model.delete() for multi-table inheritance • Model.delete() and QuerySet.delete() return the number of objects deleted • Date/time lookups can be chained with lookups: Entry.objects.filter (pub_date__month__gt=6) • There is a Now() database function
longer clear() and add() • simple_tag now wraps tag output in conditional_escape • Implicit QuerySet __in lookup removed for related query sets • Form initialization was moved from ProcessFormView.get() to FormMixin. get_context_data()
signals and router methods are removed • No apps w/o migrations unless --run-syncdb is passed to migrate • All models need to be defined inside an installed application or declare an explicit app_label • The default value of the RedirectView. permanent attribute has changed from True to False