Ticket #8911: 1.0-porting-guide.diff

File 1.0-porting-guide.diff, 2.7 KB (added by arien, 16 years ago)

Fixes for mentioned issues and some light editing of the text.

  • docs/releases/1.0-porting-guide.txt

     
    4242~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4343
    4444Rename your ``maxlength`` argument to ``max_length`` (this was changed to be
    45 consistant with form fields):
     45consistent with form fields):
    4646
    4747Replace ``__str__`` with ``__unicode__``
    4848~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    473473    import datetime
    474474
    475475    class Article(models.Model):
    476         title = models.CharField(maxlength=100)
     476        title = models.CharField(max_length=100)
    477477        published = models.DateField(default=datetime.datetime.now)
    478478
    479479``DecimalField`` is new, and ``FloatField`` is now a proper float
     
    536536     this procedure for any of the standard Django models.
    537537
    538538If something goes wrong in the above process, just copy your backed up
    539 database file over the top of the original file and start again.
     539database file over the original file and start again.
    540540
    541541Internationalization
    542542--------------------
     
    644644``Feed.__init__`` has changed
    645645~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    646646
    647 The ``__init__()`` parameters in the syndication framework's ``Feed`` class now
     647The ``__init__()`` method of the syndication framework's ``Feed`` class now
    648648take an ``HttpRequest`` object as its second parameter, instead of the feed's
    649649URL. This allows the syndication framework to work without requiring the sites
    650650framework. This only affects code that subclass ``Feed`` and overrides the
     
    656656``SortedDictFromList`` is gone
    657657~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    658658
    659 `django.newforms.forms.SortedDictFromList`` was removed.
    660 :class:`django.utils.datastructures.SortedDict`` can now be instantiated with
     659``django.newforms.forms.SortedDictFromList`` was removed.
     660:class:`django.utils.datastructures.SortedDict` can now be instantiated with
    661661a sequence of tuples.
    662662
    663663To update your code:
     
    665665     1. Use :class:`django.utils.datastructures.SortedDict` wherever you were
    666666        using ``django.newforms.forms.SortedDictFromList``.
    667667
    668      2. Because :meth:`django.utils.datastructures.SortedDict.copy` returns a
    669         deepcopy as ``SortedDictFromList`` method did, you will need to update
    670         your code if you were relying on a deepcopy. Do this by using
     668     2. Because :meth:`django.utils.datastructures.SortedDict.copy` doesn't
     669        return a deepcopy as ``SortedDictFromList.copy()`` did, you will need
     670        to update your code if you were relying on a deepcopy. Do this by using
    671671        ``copy.deepcopy`` directly.
    672672
    673673Database backend functions
Back to Top