Changes between Version 99 and Version 100 of BackwardsIncompatibleChanges


Ignore:
Timestamp:
Jun 18, 2007, 4:33:44 PM (17 years ago)
Author:
Malcolm Tredinnick
Comment:

Documented the change to NodeList usage in [5482]

Legend:

Unmodified
Added
Removed
Modified
  • BackwardsIncompatibleChanges

    v99 v100  
    2626 * May 14, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Newforms:clean_datachangedtocleaned_data Newforms: clean_data changed to cleaned_data]
    2727 * May 20, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#RenamedFloatFieldtoDecimalField Renamed FloatField to DecimalField]
     28 * June 17, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#NodeListsmustcontainNodes NodeLists must contain Nodes]
    2829
    2930== Database constraint names changed ==
     
    220221
    221222If something goes wrong in the above process, just copy your backed up database file over the top of the original file and start again.
     223
     224== !NodeLists must contain Nodes ==
     225
     226Django's template rendering classes includes a !NodeList class, which is a subclass of Python's list type. Previously, a !NodeList could hold objects with a {{{render()}}} method (usually Node subclasses) or strings.
     227
     228In [5482], as part of an optimisation to improve template rendering speeds, this was changed so that every object in a !NodeList must be a !Node subclass (or have the same interface). Strings are no longer allowed.
     229
     230This change is unlikely to affect most code. However, if you have a custom template tag that uses !NodeList and does not populate it with Nodes, you should change your code to use normal lists instead. Django's own !ForNode class (for implementing "for loops" in templates) was the only internal code affected by this change. Consult the current implementation of {{{ForNode.iter_render}}} to see how the !NodeList usage has been replaced.
Back to Top