Changes between Version 260 and Version 261 of BackwardsIncompatibleChanges


Ignore:
Timestamp:
Sep 1, 2008, 5:20:17 PM (16 years ago)
Author:
Jacob
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BackwardsIncompatibleChanges

    v260 v261  
    12941294
    12951295A side-effect of this is that you can no longer give extra arguments to the function or the tag beyond what should match the pattern for the name you have given. So if your pattern expects two argument and you give it three, no match will occur. Similarly if it expects arguments called `foo` and `bar` and you also provide a dictionary containing `baz`, no match will occur. This is because ''another'' pattern might accept `foo`, `bar` ''and'' `baz` and we don't want the first pattern to match by accident.
     1296
     1297== Moved USStateField and PhoneNumberField to localflavor ==
     1298
     1299[8819] moved the us-centric `USStateField` and `PhoneNumberField` out of core and into `django.contrib.localflavor.us.models`. If you're using those fields, you'll need to import the fields from their new location. That is, if you had:
     1300
     1301{{{
     1302#!python
     1303from django.db import models
     1304
     1305class Person(models.Model):
     1306    state = models.USSateField()
     1307    phone = models.PhoneNumberField()
     1308    ...
     1309}}}
     1310
     1311You'll need to change it to:
     1312
     1313{{{
     1314#!python
     1315from django.db import models
     1316from django.contrib.localflavor.us.models import USStateField, PhoneNumberField
     1317
     1318class Person(models.Model):
     1319    state = USSateField()
     1320    phone = PhoneNumberField()
     1321    ...
     1322}}}
Back to Top