Changes between Version 40 and Version 41 of BackwardsIncompatibleChanges


Ignore:
Timestamp:
11/26/2005 04:44:42 PM (10 years ago)
Author:
adrian
Comment:

Added "Changed the way custom template tags and filters are registered"

Legend:

Unmodified
Added
Removed
Modified
  • BackwardsIncompatibleChanges

    v40 v41  
    11= Backwards-incompatible changes =
    22
    3 As Django is still in pre-release mode, we haven't yet committed to maintaining backwards compatibility in any APIs. Although we're keeping such changes to a minimum, Django developers should be acutely aware of these changes.
    4 
    5 Of course, once we reach our first official release, we'll be strongly committed to backward compatibility.
     3As Django is still in pre-1.0 mode, we haven't yet committed to maintaining backwards compatibility in any APIs. Although we're keeping such changes to a minimum, Django developers should be acutely aware of these changes.
     4
     5Of course, once we reach 1.0, we'll be strongly committed to backward compatibility.
    66
    77This page lists all backwards-incompatible changes to Django so far.
     
    99== Moved mod_python handler ==
    1010
    11 As of [169], using {{{django.core.handler}}} as a mod_python handler is deprecated. Use {{{django.core.handlers.modpython}}} instead. We will be removing {{{django.core.handler}}} for Django's first release.
     11As of [169], using {{{django.core.handler}}} as a mod_python handler is deprecated. Use {{{django.core.handlers.modpython}}} instead. We will be removing {{{django.core.handler}}} for 1.0.
    1212
    1313== Changed ordering syntax ==
     
    2121{{{order_by=['foo', '-bar']}}}
    2222
    23 The old syntax is deprecated, and we'll stop supporting it for Django's first release.
     23The old syntax is deprecated, and we'll stop supporting it for 1.0.
    2424
    2525== Refactored meta.py ==
     
    3737{{{edit_inline=meta.TABULAR}}}
    3838
    39 We'll stop supporting the old syntax for Django's first release.
     39We'll stop supporting the old syntax for 1.0.
    4040
    4141== Changed admin log to store primary keys as TEXT fields, not INTEGER fields ==
     
    366366COMMIT;
    367367}}}
     368
     369== Changed the way custom template tags and filters are registered ==
     370
     371As of [], we changed the way custom template tags and filters are registered. If you've written custom template tags or filters, you'll need to make a small change to the way they're registered.
     372
     373Old way:
     374{{{
     375from django.core import template
     376
     377template.register_filter('lower', lower, False)
     378template.register_tag('current_time', do_current_time)
     379}}}
     380
     381New way:
     382
     383{{{
     384from django.core import template
     385
     386register = template.Library()
     387register.filter('lower', lower)
     388register.tag('current_time', do_current_time)
     389}}}
     390
     391A new decorator syntax is also supported.
     392
     393See [http://www.djangoproject.com/documentation/templates_python/#writing-custom-template-filters Writing custom template filters] and [http://www.djangoproject.com/documentation/templates_python/#writing-custom-template-tags Writing custom template tags] for full documentation.
Back to Top