From acf2600a4c1b3d6cd4b1a4166ea62d784d246442 Mon Sep 17 00:00:00 2001 From: Gary Wilson Jr Date: Sun, 7 Sep 2008 19:15:41 +0000 Subject: [PATCH] Fixed #8911 -- Several corrections for the 1.0 porting documentation, thanks arien. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8979 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/releases/1.0-porting-guide.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/releases/1.0-porting-guide.txt b/docs/releases/1.0-porting-guide.txt index 5048828582..f5fd68dc10 100644 --- a/docs/releases/1.0-porting-guide.txt +++ b/docs/releases/1.0-porting-guide.txt @@ -42,7 +42,7 @@ Rename ``maxlength`` to ``max_length`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rename your ``maxlength`` argument to ``max_length`` (this was changed to be -consistant with form fields): +consistent with form fields): Replace ``__str__`` with ``__unicode__`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -473,7 +473,7 @@ New (1.0):: import datetime class Article(models.Model): - title = models.CharField(maxlength=100) + title = models.CharField(max_length=100) published = models.DateField(default=datetime.datetime.now) ``DecimalField`` is new, and ``FloatField`` is now a proper float @@ -536,7 +536,7 @@ Notes: this procedure for any of the standard Django models. If something goes wrong in the above process, just copy your backed up -database file over the top of the original file and start again. +database file over the original file and start again. Internationalization -------------------- @@ -644,10 +644,10 @@ Syndication ``Feed.__init__`` has changed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The ``__init__()`` parameters in the syndication framework's ``Feed`` class now -take an ``HttpRequest`` object as its second parameter, instead of the feed's +The ``__init__()`` method of the syndication framework's ``Feed`` class now +takes an ``HttpRequest`` object as its second parameter, instead of the feed's URL. This allows the syndication framework to work without requiring the sites -framework. This only affects code that subclass ``Feed`` and overrides the +framework. This only affects code that subclasses ``Feed`` and overrides the ``__init__()`` method, and code that calls ``Feed.__init__()`` directly. Data structures @@ -656,8 +656,8 @@ Data structures ``SortedDictFromList`` is gone ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -`django.newforms.forms.SortedDictFromList`` was removed. -:class:`django.utils.datastructures.SortedDict`` can now be instantiated with +``django.newforms.forms.SortedDictFromList`` was removed. +:class:`django.utils.datastructures.SortedDict` can now be instantiated with a sequence of tuples. To update your code: @@ -665,9 +665,9 @@ To update your code: 1. Use :class:`django.utils.datastructures.SortedDict` wherever you were using ``django.newforms.forms.SortedDictFromList``. - 2. Because :meth:`django.utils.datastructures.SortedDict.copy` returns a - deepcopy as ``SortedDictFromList`` method did, you will need to update - your code if you were relying on a deepcopy. Do this by using + 2. Because :meth:`django.utils.datastructures.SortedDict.copy` doesn't + return a deepcopy as ``SortedDictFromList.copy()`` did, you will need + to update your code if you were relying on a deepcopy. Do this by using ``copy.deepcopy`` directly. Database backend functions