你是否期待 Django 1.4 很久了,现在终于发布了第一个 beta 版本。该版本最大的改进就是支持浏览器内的测试框架,但另外需要注意的是不再支持 Python 2.4.
下面是 Django 1.4 Beta 1 的主要改进:
- SELECT FOR UPDATE support: Features a QuerySet.select_for_update() that generates a SQL query and prevents other transactions fro modifying of deleting matched rows.
- Model.objects.bulk_create in the ORM: allows you to create multiple objects in the ORM more efficiently.
- QuerySet.prefetch_related: Once query evaluation begins, a new QuerySet is returned that will prefetch related lookups in one batch.
- Improved Password Hashing: Django 1.4 uses the PBKDF2 algorithm in place of the SHA1 algorithm, which has been deemed less secure. ("Warning: Django 1.4 alpha contained a bug that corrupted PBKDF2 hashes. More information is available here.")
- HTML5 Doctype: While Django will maintain compatibility with older browsers, it has now switched the admin and other bundled templates to HMTL5, meaning any HTML5 features can be used in the admin pages without losing HTML5 validity.
Django 1.4 beta 1 同时包含如下特性:
完整的改进记录请看:release notes.
Django 1.4 beta 1 可从这里 下载.
