Django

Code

Changeset 4853

Show
Ignore:
Timestamp:
03/29/07 11:58:58 (2 years ago)
Author:
jdunck
Message:

gis: Merged revisions 4799-4809 via svnmerge.

Last revision prior to 0.96 release.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/gis

    • Property svnmerge-integrated changed from /django/trunk:1-4785,4796-4797 to /django/trunk:1-4785,4796-4797,4799-4809
  • django/branches/gis/django/__init__.py

    r3495 r4853  
    1 VERSION = (0, 96, 'pre'
     1VERSION = (0, 96, None
  • django/branches/gis/docs/add_ons.txt

    r4786 r4853  
    5151formtools 
    5252========= 
    53  
    54 **New in Django development version** 
    5553 
    5654A set of high-level abstractions for Django forms (django.newforms). 
     
    143141=========== 
    144142 
    145 **New in Django development version** 
    146  
    147143A collection of various Django snippets that are useful only for a particular 
    148144country or culture. For example, ``django.contrib.localflavor.usa.forms`` 
  • django/branches/gis/docs/django-admin.txt

    r4786 r4853  
    101101------------------------------ 
    102102 
    103 **New in Django development version** 
    104  
    105103Output to standard output all data in the database associated with the named  
    106104application(s). 
     
    117115flush 
    118116----- 
    119  
    120 **New in Django development version** 
    121117 
    122118Return the database to the state it was in immediately after syncdb was  
     
    166162only works in PostgreSQL and with certain types of MySQL tables. 
    167163 
    168 install [appname appname ...] 
    169 ----------------------------- 
    170  
    171 **Removed in Django development version** 
    172  
    173 Executes the equivalent of ``sqlall`` for the given appnames. 
    174  
    175164loaddata [fixture fixture ...] 
    176165------------------------------ 
    177  
    178 **New in Django development version** 
    179166 
    180167Searches for and loads the contents of the named fixture into the database. 
     
    351338------------------------------- 
    352339 
    353 **New in Django development version** 
    354  
    355340Prints the custom SQL statements for the given appnames. 
    356341 
     
    374359Prints the CREATE INDEX SQL statements for the given appnames. 
    375360 
    376 sqlinitialdata [appname appname ...] 
    377 -------------------------------------------- 
    378  
    379 **Removed in Django development version** 
    380  
    381 This method has been renamed ``sqlcustom`` in the development version of Django.  
    382  
    383361sqlreset [appname appname ...] 
    384362-------------------------------------- 
     
    427405---- 
    428406 
    429 **New in Django development version** 
    430  
    431407Discover and run tests for all installed models.  See `Testing Django applications`_ for more information. 
    432408 
     
    476452-------- 
    477453 
    478 **New in Django development version** 
    479  
    480454Example usage:: 
    481455 
     
    493467--indent 
    494468-------- 
    495  
    496 **New in Django development version** 
    497469 
    498470Example usage:: 
     
    507479--------- 
    508480 
    509 **New in Django development version** 
    510  
    511481Inform django-admin that the user should NOT be prompted for any input. Useful 
    512482if the django-admin script will be executed as an unattended, automated 
     
    531501----------- 
    532502 
    533 **New in Django development version** 
    534  
    535503Example usage:: 
    536504 
     
    543511--adminmedia 
    544512------------ 
    545  
    546 **New in Django development version** 
    547513 
    548514Example usage:: 
  • django/branches/gis/docs/generic_views.txt

    r4669 r4853  
    9898      context. By default, this is an empty dictionary. If a value in the 
    9999      dictionary is callable, the generic view will call it 
    100       just before rendering the template. (**This is new in the 
    101       Django development version.**) 
     100      just before rendering the template. 
    102101 
    103102**Example:** 
     
    753752    * ``previous``: The previous page number, as an integer. This is 1-based. 
    754753 
    755     * `last_on_page`: **New in Django development version** The number of the 
     754    * `last_on_page`: The number of the 
    756755      last result on the current page. This is 1-based. 
    757756 
    758     * `first_on_page`: **New in Django development version** The number of the 
     757    * `first_on_page`: The number of the 
    759758      first result on the current page. This is 1-based. 
    760759 
  • django/branches/gis/docs/middleware.txt

    r4420 r4853  
    105105---------------------------------------------------- 
    106106 
    107 **New in Django development version** 
    108  
    109107Sets ``request.META['REMOTE_ADDR']`` based on 
    110108``request.META['HTTP_X_FORWARDED_FOR']``, if the latter is set. This is useful 
  • django/branches/gis/docs/model-api.txt

    r4786 r4853  
    363363used in URLs. 
    364364 
    365 In the Django development version, you can specify ``maxlength``. If 
    366 ``maxlength`` is not specified, Django will use a default length of 50. In 
    367 previous Django versions, there's no way to override the length of 50. 
     365Like a CharField, you can specify ``maxlength``. If ``maxlength`` is 
     366not specified, Django will use a default length of 50. 
    368367 
    369368Implies ``db_index=True``. 
     
    14581457    AND (first_name ILIKE '%lennon%' OR last_name ILIKE '%lennon%') 
    14591458 
    1460 **New in Django development version:** For faster and/or more restrictiv
    1461 searches, prefix the field name with an operator: 
     1459For faster and/or more restrictive searches, prefix the field nam
     1460with an operator: 
    14621461 
    14631462``^`` 
     
    17551754~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    17561755 
    1757 **New in Django development version.** 
    1758  
    17591756The problem with the way we wrote ``get_absolute_url()`` above is that it 
    17601757slightly violates the DRY principle: the URL for this object is defined both 
  • django/branches/gis/docs/newforms.txt

    r4526 r4853  
    1010============== 
    1111 
    12 ``django.newforms`` currently is only available in the Django development version 
    13 -- i.e., it's not available in the Django 0.95 release. For the next Django 
    14 release, our plan is to do the following: 
     12``django.newforms`` currently is only available in Django beginning 
     13with the 0.96 release.  the Django development version -- i.e., it's 
     14not available in the Django 0.95 release. For the next Django release, 
     15our plan is to do the following: 
    1516 
    1617    * As of revision [4208], we've copied the current ``django.forms`` to 
  • django/branches/gis/docs/release_notes_0.96.txt

    r4786 r4853  
    1717instead of needing to make incremental changes to keep up with the 
    1818development version of Django. 
     19 
     20Backwards-incompatible changes 
     21============================== 
     22 
     23The following changes may require you to update your code when you switch from 
     240.95 to 0.96: 
     25 
     26``MySQLdb`` version requirement 
     27------------------------------- 
     28 
     29Due to a bug in older versions of the ``MySQLdb`` Python module (which 
     30Django uses to connect to MySQL databases), Django's MySQL backend now 
     31requires version 1.2.1p2 or higher of `MySQLdb`, and will raise 
     32exceptions if you attempt to use an older version. 
     33 
     34If you're currently unable to upgrade your copy of ``MySQLdb`` to meet 
     35this requirement, a separate, backwards-compatible backend, called 
     36"mysql_old", has been added to Django. To use this backend, change 
     37the ``DATABASE_ENGINE`` setting in your Django settings file from 
     38this:: 
     39 
     40    DATABASE_ENGINE = "mysql" 
     41 
     42to this:: 
     43 
     44    DATABASE_ENGINE = "mysql_old" 
     45 
     46However, we strongly encourage MySQL users to upgrade to a more recent 
     47version of `MySQLdb` as soon as possible, The "mysql_old" backend is 
     48provided only to ease this transition, and is considered deprecated; 
     49aside from any necessary security fixes, it will not be actively 
     50maintained, and it will be removed in a future release of Django. 
     51 
     52Also, note that some features, like the new ``DATABASE_OPTIONS`` 
     53setting (see the `databases documentation`_ for details), are only 
     54available on the "mysql" backend, and will not be made available for 
     55"mysql_old". 
     56 
     57.. _databases documentation: ../databases/ 
     58 
     59Database constraint names changed 
     60--------------------------------- 
     61 
     62The format of the constraint names Django generates for foreign key 
     63references have changed slightly. These names are generally only used 
     64when it is not possible to put the reference directly on the affected 
     65column, so they is not always visible. 
     66 
     67The effect of this change is that running ``manage.py reset`` and 
     68similar commands against an existing database may generate SQL with 
     69the new form of constraint name, while the database itself contains 
     70constraints named in the old form; this will cause the database server 
     71to raise an error message about modifying non-existent constraints. 
     72 
     73If you need to work around this, there are two methods available: 
     74 
     75    1. Redirect the output of ``manage.py`` to a file, and edit the 
     76       generated SQL to use the correct constraint names before 
     77       executing it. 
     78 
     79    2. Examine the output of ``manage.py sqlall`` to see the new-style 
     80       constraint names, and use that as a guide to rename existing 
     81       constraints in your database. 
     82 
     83Name changes in ``manage.py`` 
     84----------------------------- 
     85 
     86A few of the options to ``manage.py`` have changed with the addition of fixture 
     87support: 
     88 
     89    * There are new ``dumpdata`` and ``loaddata`` commands which, as 
     90      you might expect, will dump and load data to/from the 
     91      database. These commands can operate against any of Django's 
     92      supported serialization formats. 
     93 
     94    * The ``sqlinitialdata`` command has been renamed to ``sqlcustom`` to 
     95      emphasize that ``loaddata`` should be used for data (and ``sqlcustom`` for 
     96      other custom SQL -- views, stored procedures, etc.). 
     97       
     98    * The vestigial ``install`` command has been removed. Use ``syncdb``. 
     99 
     100Backslash escaping changed 
     101-------------------------- 
     102 
     103The Django database API now escapes backslashes given as query parameters. If 
     104you have any database API code that matches backslashes, and it was working before 
     105(despite the lack of escaping), you'll have to change your code to "unescape" the 
     106slashes one level. 
     107 
     108For example, this used to work:: 
     109 
     110    # Find text containing a single backslash 
     111    MyModel.objects.filter(text__contains='\\\\') 
     112 
     113The above is now incorrect, and should be rewritten as:: 
     114 
     115    # Find text containing a single backslash 
     116    MyModel.objects.filter(text__contains='\\') 
     117 
     118Removed ENABLE_PSYCO setting 
     119---------------------------- 
     120 
     121The ``ENABLE_PSYCO`` setting no longer exists. If your settings file includes 
     122``ENABLE_PSYCO`` it will have no effect; to use Psyco_, we recommend 
     123writing a middleware class to activate it. 
     124 
     125.. _psyco: http://psyco.sourceforge.net/ 
    19126 
    20127What's new in 0.96? 
     
    130237updating users have been added to the admin interface, so you no 
    131238longer need to worry about working with hashed passwords in the admin. 
    132  
    133 Backwards-incompatible changes 
    134 ============================== 
    135  
    136 The following changes may require you to update your code when you switch from 
    137 0.95 to 0.96: 
    138  
    139 `MySQLdb` version requirement 
    140 ----------------------------- 
    141  
    142 Due to a bug in older versions of the `MySQLdb` Python module (which 
    143 Django uses to connect to MySQL databases), Django's MySQL backend now 
    144 requires version 1.2.1p2 or higher of `MySQLdb`, and will raise 
    145 exceptions if you attempt to use an older version. 
    146  
    147 If you're currently unable to upgrade your copy of `MySQLdb` to meet 
    148 this requirement, a separate, backwards-compatible backend, called 
    149 "mysql_old", has been added to Django. To use this backend, change 
    150 the ``DATABASE_ENGINE`` setting in your Django settings file from 
    151 this:: 
    152  
    153     DATABASE_ENGINE = "mysql" 
    154  
    155 to this:: 
    156  
    157     DATABASE_ENGINE = "mysql_old" 
    158  
    159 However, we strongly encourage MySQL users to upgrade to a more recent 
    160 version of `MySQLdb` as soon as possible, The "mysql_old" backend is 
    161 provided only to ease this transition, and is considered deprecated; 
    162 aside from any necessary security fixes, it will not be actively 
    163 maintained, and it will be removed in a future release of Django. 
    164  
    165 Also, note that some features, like the new ``DATABASE_OPTIONS`` 
    166 setting (see the `databases documentation`_ for details), are only 
    167 available on the "mysql" backend, and will not be made available for 
    168 "mysql_old". 
    169  
    170 .. _databases: ../databases/ 
    171  
    172 Database constraint names changed 
    173 --------------------------------- 
    174  
    175 The format of the constraint names Django generates for foreign key 
    176 references have changed slightly. These names are generally only used 
    177 when it is not possible to put the reference directly on the affected 
    178 column, so they is not always visible. 
    179  
    180 The effect of this change is that running ``manage.py reset`` and 
    181 similar commands against an existing database may generate SQL with 
    182 the new form of constraint name, while the database itself contains 
    183 constraints named in the old form; this will cause the database server 
    184 to raise an error message about modifying non-existent constraints. 
    185  
    186 If you need to work around this, there are two methods available: 
    187  
    188     1. Redirect the output of ``manage.py`` to a file, and edit the 
    189        generated SQL to use the correct constraint names before 
    190        executing it. 
    191  
    192     2. Examine the output of ``manage.py sqlall`` to see the new-style 
    193        constraint names, and use that as a guide to rename existing 
    194        constraints in your database. 
    195  
    196 Names changes in ``manage.py`` 
    197 ------------------------------ 
    198  
    199 A few of the options to ``manage.py`` have changed with the addition of fixture 
    200 support: 
    201  
    202     * There are new ``dumpdata`` and ``loaddata`` commands which, as 
    203       you might expect, will dump and load data to/from the 
    204       database. These commands can operate against any of Django's 
    205       supported serialization formats. 
    206  
    207     * The ``sqlinitialdata`` command has been renamed to ``sqlcustom`` to 
    208       emphasize that ``loaddata`` should be used for data (and ``sqlcustom`` for 
    209       other custom SQL -- views, stored procedures, etc.). 
    210        
    211     * The vestigial ``install`` command has been removed. Use ``syncdb``. 
    212  
    213 Backslash escaping changed 
    214 -------------------------- 
    215  
    216 The Django database API now escapes backslashes given as query parameters. If 
    217 you have any database API code that matches backslashes, and it was working before 
    218 (despite the lack of escaping), you'll have to change your code to "unescape" the 
    219 slashes one level. 
    220  
    221 For example, this used to work:: 
    222  
    223     # Find text containing a single backslash 
    224     MyModel.objects.filter(text__contains='\\\\') 
    225  
    226 The above is now incorrect, and should be rewritten as:: 
    227  
    228     # Find text containing a single backslash 
    229     MyModel.objects.filter(text__contains='\\') 
    230  
    231 Removed ENABLE_PSYCO setting 
    232 ---------------------------- 
    233  
    234 The ``ENABLE_PSYCO`` setting no longer exists. If your settings file includes 
    235 ``ENABLE_PSYCO`` it will have no effect; to use Psyco, we recommend 
    236 writing a middleware class to activate it. 
    237  
    238 .. _psyco: http://psyco.sourceforge.net/ 
    239239 
    240240Thanks 
  • django/branches/gis/docs/request_response.txt

    r4538 r4853  
    385385    exist. 
    386386 
    387     The ``path`` and ``domain`` arguments are new in the Django development version. 
    388387    Due to the way cookies work, ``path`` and ``domain`` should be the same 
    389388    values you used in ``set_cookie()`` -- otherwise the cookie may not be deleted. 
  • django/branches/gis/docs/sessions.txt

    r4420 r4853  
    266266--------------------- 
    267267 
    268 **New in Django development version** 
    269  
    270268Default: ``False`` 
    271269 
  • django/branches/gis/docs/settings.txt

    r4786 r4853  
    429429FIXTURE_DIRS 
    430430------------- 
    431  
    432 **New in Django development version** 
    433431 
    434432Default: ``()`` (Empty tuple) 
     
    717715--------------------- 
    718716 
    719 **New in Django development version** 
    720  
    721717Default: ``False`` 
    722718 
     
    813809----------- 
    814810 
    815 **New in Django development version** 
    816  
    817811Default: ``'django.test.simple.run_tests'`` 
    818812 
     
    824818TEST_DATABASE_NAME 
    825819------------------ 
    826  
    827 **New in Django development version** 
    828820 
    829821Default: ``None`` 
  • django/branches/gis/docs/templates.txt

    r4669 r4853  
    113113======== 
    114114 
    115 **New in Django development version** 
    116  
    117115To comment-out part of a template, use the comment syntax: ``{# #}``. 
    118116 
     
    254252      completely overriding it. 
    255253 
    256     * **New in Django development version:** For extra readability, you can 
    257       optionally give a *name* to your ``{% endblock %}`` tag. For example:: 
     254    * For extra readability, you can optionally give a *name* to your 
     255      ``{% endblock %}`` tag. For example:: 
    258256 
    259257          {% block content %} 
     
    549547        {% endfor %} 
    550548 
    551 2. **New in Django development version.** If given a variable, check whether that 
    552    variable has changed. For example, the following shows the date every time i
    553    changes, but only shows the hour if both the hour and the date has changed:: 
     5492. If given a variable, check whether that variable has changed. For 
     550   example, the following shows the date every time it changes, bu
     551   only shows the hour if both the hour and the date has changed:: 
    554552 
    555553        {% for date in days %} 
     
    829827    ==================  ======= 
    830828 
    831 Note: ``opencomment`` and ``closecomment`` are new in the Django development version. 
    832  
    833829url 
    834830~~~ 
    835  
    836 **New in Django development version** 
    837831 
    838832**Note that the syntax for this tag may change in the future, as we make it more robust.** 
     
    976970    * ``36.15`` gets converted to ``36.2`` 
    977971    * ``36`` gets converted to ``36`` 
    978  
    979 **New in Django development version** 
    980972 
    981973If used with a numeric integer argument, ``floatformat`` rounds a number to that  
  • django/branches/gis/docs/testing.txt

    r4786 r4853  
    22Testing Django applications 
    33=========================== 
    4  
    5 **New in Django development version**. 
    64 
    75Automated testing is an extremely useful weapon in the bug-killing arsenal 
  • django/branches/gis/docs/url_dispatch.txt

    r4669 r4853  
    401401-------------------------------------- 
    402402 
    403 **New in Django development version.** 
    404  
    405403Similarly, you can pass extra options to ``include()``. When you pass extra 
    406404options to ``include()``, *each* line in the included URLconf will be passed 
     
    443441=========================================== 
    444442 
    445 **New in Django development version.** 
    446  
    447443Some developers find it more natural to pass the actual Python function object 
    448444rather than a string containing the path to its module. This alternative is