Share
Embed
Transcript
22 slides
-
Django 1.8 • Release candidate is out • Final due
around April 1st • PLEASE TEST NOW -
Headline features • Template engines • Model._meta formalised • Django-secure
merged • contrib.postgres • UUID and timedelta support • Expressions • TestCase.setUpTestData -
Template engines • Funded work by Aymeric Augustin • API
for template engine backends • Built in Jinja2 support -
Model._meta • GSOC work by Daniel Pyrathon • Official API
to access information about fields on models • MyModel._meta.get_field('name') • MyModel._meta.get_fields() • More details in a talk from DUTH -
Django-secure merged • External package with security enhancements integrated by
Erik Romijn • New SecurityMiddleware with settings for HSTS, SSL etc. • ./manage.py check --deploy -
django.contrib.postgres • Made possible by awesome kickstarter backers • ArrayField,
RangeField, HStoreField • unaccent lookup -
UUID and timedelta • New UUIDField and DurationField for both
models and forms. • Native support on postgres, duration native on Oracle, otherwise emulated as strings for UUID and bigint of microseconds for Duration. • Improvements to date/time arithmetic on all backends -
Expressions • 2k+ line, 12 month effort by Josh Smeaton
• Significant internal refactoring of .annotate() and .aggregate() to allow custom Expression classes • Coalesce, Concat, Substr, Case/When • Combined with custom lookups significant expand the expressive power of the ORM -
TestCase.setUpTestData • New class method to set up data for
a test case on a class by class level • Tests run in an atomic block and roll back to this state increasing test speed • TestCase run in a wider atomic block • Doesn't work on MyISAM • Works with fixtures, but you shouldn't -
Admin & Auth • Hook to override the delete view
in the admin • Permission.name extended to 255 characters - please run migration • Hasher iterations increased 33% • last_login now has null=True -
GIS & MySQL • Automatic configuration of GIS by migrate
• GeoJSON serializer • Ongoing GIS cleanup work using new ORM APIs • MySQL microsecond support -
Forms & Generic views • Form.has_error() • required_css_class on labels
• Field takes label_suffix • MultipleObjectMixin.ordering • SingleObjectMixin.query_pk_and_slug -
Management commands • dumpdata --output <file> • runserver uses daemon
threads • makemigrations --name • showmigrations • argparse instead of optparse -
Migrations • RunSQL parameter support • Data migrations for apps
without models • Managers can be serialized as part of model state -
Models • default_related_name • Model.from_db • Model.refresh_from_db • Transform.bilateral •
Can't assign unsaved models to FKs • ManyToMany methods run in transaction -
Models • Field.from_db_value (replaces SubFieldBase) • Query related lookups check
model type • select_related checks fields • EmailField max length to 254 -
Responses, Tests, Validators • FileResponse • TestCase.assertJSONEqual • --keepdb, --reverse,
--debug-sql • URLValidator supports IPv6, unicode domains and URLs with auth data -
Old deprecations removed • contrib.comments • Old style transaction management
• Old query_set style attributes • PIL support (i.e. not Pillow) -
Django 1.9? • More contrib.postgres • Custom indexes • Admin
reskin • Composite fields • Whatever you do tomorrow!