Weeks in review: July 10

Here are the highlights of Django improvements over the past couple of weeks.

  • Changeset 3214: Added title_template and description_template hooks to Feed class in syndication framework. These let you override the default template names for Feed classes, which is useful when you've got multiple Feed classes with the same slug.
  • Changeset 3217: Added Manager.create() method, which creates and saves an object in a single step. This is nicely parallel to the API for creating related objects (e.g. foo.site_set.create()) and lets you do more in fewer lines of code.
  • Changeset 3223: Date lookups/comparisons using the database API now accept strings as well as datetime objects. For example, Article.objects.filter(pub_date__exact='2005-07-27') is now valid. Previously, you had to pass in a datetime object.
  • Changeset 3225, 3237 and others: Added a serialization framework, which includes JSON output. Expect more on this soon.
  • Changeset 3226: Merged the "multi-auth" branch to trunk. This makes Django's authentication layer pluggable. For instance, you can plug in LDAP or some other authentication source. See the new docs. Big thanks to Joseph Kocherhans for his work on this.
  • Changeset 3246: Raw objects can now be used as database lookup values in "exact" and "in" query lookups. For example, now Article.objects.filter(author=some_author_instance) is possible, rather than Article.objects.filter(author__id__exact=some_author_instance.id).
  • Changeset 3247: Added a USE_I18N setting, which lets you turn off internationalization overhead with a single setting. It defaults to True for backwards compatibility. If you set USE_I18N=False, your admin JavaScript will be more efficient/lightweight, and Django won't load most internationalization code into memory. More optimizations are forthcoming.
  • Changeset 3248: Now any database lookup argument that doesn't end in a known query term (such as "exact", "lt", "contains", etc.) is assumed to be "exact". This means you can use Photo.objects.filter(author__name='John') rather than Photo.objects.filter(author__name__exact='John').
  • Changeset 3269: The template system now treats literal strings 'False' and 'True' as the boolean equivalents.
  • Changeset 3272: Added an optional argument to the "pluralize" template-system filter, which lets you specify the pluralization for words that aren't pluralized by adding a simple "s".
  • Changeset 3285: Improved the SQLite database introspection (django-admin.py inspectdb) to find primary keys.
  • Changeset 3305: The e-mail validator now accepts top-level domains of up to six characters long, to accomodate the new ".museum" domain.
  • Changeset 3307: Added a list_display_links option to class Admin. This regulates which fields/columns on the admin change-list page have links. See the docs.

In other Django news:

Posted by Adrian Holovaty on July 10, 2006