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. |
| 3 | As 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 | |
| 5 | Of course, once we reach 1.0, we'll be strongly committed to backward compatibility. |
| 368 | |
| 369 | == Changed the way custom template tags and filters are registered == |
| 370 | |
| 371 | As 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 | |
| 373 | Old way: |
| 374 | {{{ |
| 375 | from django.core import template |
| 376 | |
| 377 | template.register_filter('lower', lower, False) |
| 378 | template.register_tag('current_time', do_current_time) |
| 379 | }}} |
| 380 | |
| 381 | New way: |
| 382 | |
| 383 | {{{ |
| 384 | from django.core import template |
| 385 | |
| 386 | register = template.Library() |
| 387 | register.filter('lower', lower) |
| 388 | register.tag('current_time', do_current_time) |
| 389 | }}} |
| 390 | |
| 391 | A new decorator syntax is also supported. |
| 392 | |
| 393 | See [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. |