django1.7

My favorite features in django 1.7

  • migrations
  • FileField.upload_to is now optional
  • FILE_UPLOAD_DIRECTORY_PERMISSIONS (similar to FILE_UPLOAD_PERMISSIONS)
  • send_mail() now accepts an html_message parameter for sending a multipart text/plain and text/html email.
  • Field.choices now allows you to customize the “empty choice” label by including a tuple with an empty string or None for the key and the custom label as the value.
  • It’s now possible to remove form fields in a subclass of a parent
  • admin changelist now table has field-<field_name> css classes on cells.
  • update_or_create
  • formsets now have a min_num and validate_min
  • @admin.register syntax on classes, no need for admin.autodiscover()
  • QuerySets can now be easily used as managers
  • now possible to customize the behavior of prefetch_related.
  • form.clean() doesn’t need to return self.cleaned_data
  • admin “the object has been saved” messages have been changed from yellow to green
  • Runservers will restart faster if pyinotify is installed
Advertisements