Changes between Version 66 and Version 67 of BackwardsIncompatibleChanges


Ignore:
Timestamp:
Aug 11, 2006, 12:25:29 AM (18 years ago)
Author:
Adrian Holovaty
Comment:

Added "Backslash escaping changed"

Legend:

Unmodified
Added
Removed
Modified
  • BackwardsIncompatibleChanges

    v66 v67  
    3737Changes made after Django [source:/django/tags/releases/0.95 0.95]
    3838 * August 2, 2006: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Databaseconstraintnameschanged Database constraint names changed]
     39 * August 11, 2006: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Backslashescapingchanged Backslash escaping changed]
    3940
    4041== Moved mod_python handler ==
     
    570571== Removed the magic ==
    571572
    572 As of [2809], the [wiki:RemovingTheMagic magic-removal branch] has been merged. There's a LONG LIST of backwards-incompatible changes, and they're all documented on the RemovingTheMagic wiki page.
     573As of [2809], the [wiki:RemovingTheMagic magic-removal branch] has been merged. There's a LONG list of backwards-incompatible changes, and they're all documented on the RemovingTheMagic wiki page.
    573574
    574575== Database constraint names changed ==
     
    577578
    578579The effect of this change is that {{{manage.py reset app_name}}} and similar commands may generate SQL with invalid constraint names and thus generate an error when run against the database (the database server will complain about the constraint not existing). To fix this, you will need to tweak the output of {{{manage.py sqlreset app_name}}} to match the correct constraint names and pass the results to the database server manually.
     580
     581== Backslash escaping changed ==
     582
     583As of [3552], the Django database API now escapes backslashes given as query parameters. If you have any database API code that match backslashes, and it was working before (despite the broken escaping), you'll have to change your code to "unescape" the slashes one level.
     584
     585For example, this used to work:
     586
     587{{{
     588#!python
     589# Code that matches a single backslash
     590MyModel.objects.filter(text__contains='\\\\')
     591}}}
     592
     593But it should be rewritten as this:
     594
     595{{{
     596#!python
     597# Code that matches a single backslash
     598MyModel.objects.filter(text__contains='\\')
     599}}}
Back to Top