Changeset 4853
- Timestamp:
- 03/29/07 11:58:58 (2 years ago)
- Files:
-
- django/branches/gis (modified) (1 prop)
- django/branches/gis/django/__init__.py (modified) (1 diff)
- django/branches/gis/docs/add_ons.txt (modified) (2 diffs)
- django/branches/gis/docs/django-admin.txt (modified) (11 diffs)
- django/branches/gis/docs/generic_views.txt (modified) (2 diffs)
- django/branches/gis/docs/middleware.txt (modified) (1 diff)
- django/branches/gis/docs/model-api.txt (modified) (3 diffs)
- django/branches/gis/docs/newforms.txt (modified) (1 diff)
- django/branches/gis/docs/release_notes_0.96.txt (modified) (2 diffs)
- django/branches/gis/docs/request_response.txt (modified) (1 diff)
- django/branches/gis/docs/sessions.txt (modified) (1 diff)
- django/branches/gis/docs/settings.txt (modified) (4 diffs)
- django/branches/gis/docs/templates.txt (modified) (5 diffs)
- django/branches/gis/docs/testing.txt (modified) (1 diff)
- django/branches/gis/docs/url_dispatch.txt (modified) (2 diffs)
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')1 VERSION = (0, 96, None) django/branches/gis/docs/add_ons.txt
r4786 r4853 51 51 formtools 52 52 ========= 53 54 **New in Django development version**55 53 56 54 A set of high-level abstractions for Django forms (django.newforms). … … 143 141 =========== 144 142 145 **New in Django development version**146 147 143 A collection of various Django snippets that are useful only for a particular 148 144 country or culture. For example, ``django.contrib.localflavor.usa.forms`` django/branches/gis/docs/django-admin.txt
r4786 r4853 101 101 ------------------------------ 102 102 103 **New in Django development version**104 105 103 Output to standard output all data in the database associated with the named 106 104 application(s). … … 117 115 flush 118 116 ----- 119 120 **New in Django development version**121 117 122 118 Return the database to the state it was in immediately after syncdb was … … 166 162 only works in PostgreSQL and with certain types of MySQL tables. 167 163 168 install [appname appname ...]169 -----------------------------170 171 **Removed in Django development version**172 173 Executes the equivalent of ``sqlall`` for the given appnames.174 175 164 loaddata [fixture fixture ...] 176 165 ------------------------------ 177 178 **New in Django development version**179 166 180 167 Searches for and loads the contents of the named fixture into the database. … … 351 338 ------------------------------- 352 339 353 **New in Django development version**354 355 340 Prints the custom SQL statements for the given appnames. 356 341 … … 374 359 Prints the CREATE INDEX SQL statements for the given appnames. 375 360 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 383 361 sqlreset [appname appname ...] 384 362 -------------------------------------- … … 427 405 ---- 428 406 429 **New in Django development version**430 431 407 Discover and run tests for all installed models. See `Testing Django applications`_ for more information. 432 408 … … 476 452 -------- 477 453 478 **New in Django development version**479 480 454 Example usage:: 481 455 … … 493 467 --indent 494 468 -------- 495 496 **New in Django development version**497 469 498 470 Example usage:: … … 507 479 --------- 508 480 509 **New in Django development version**510 511 481 Inform django-admin that the user should NOT be prompted for any input. Useful 512 482 if the django-admin script will be executed as an unattended, automated … … 531 501 ----------- 532 502 533 **New in Django development version**534 535 503 Example usage:: 536 504 … … 543 511 --adminmedia 544 512 ------------ 545 546 **New in Django development version**547 513 548 514 Example usage:: django/branches/gis/docs/generic_views.txt
r4669 r4853 98 98 context. By default, this is an empty dictionary. If a value in the 99 99 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. 102 101 103 102 **Example:** … … 753 752 * ``previous``: The previous page number, as an integer. This is 1-based. 754 753 755 * `last_on_page`: **New in Django development version**The number of the754 * `last_on_page`: The number of the 756 755 last result on the current page. This is 1-based. 757 756 758 * `first_on_page`: **New in Django development version**The number of the757 * `first_on_page`: The number of the 759 758 first result on the current page. This is 1-based. 760 759 django/branches/gis/docs/middleware.txt
r4420 r4853 105 105 ---------------------------------------------------- 106 106 107 **New in Django development version**108 109 107 Sets ``request.META['REMOTE_ADDR']`` based on 110 108 ``request.META['HTTP_X_FORWARDED_FOR']``, if the latter is set. This is useful django/branches/gis/docs/model-api.txt
r4786 r4853 363 363 used in URLs. 364 364 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. 365 Like a CharField, you can specify ``maxlength``. If ``maxlength`` is 366 not specified, Django will use a default length of 50. 368 367 369 368 Implies ``db_index=True``. … … 1458 1457 AND (first_name ILIKE '%lennon%' OR last_name ILIKE '%lennon%') 1459 1458 1460 **New in Django development version:** For faster and/or more restrictive1461 searches, prefix the field namewith an operator:1459 For faster and/or more restrictive searches, prefix the field name 1460 with an operator: 1462 1461 1463 1462 ``^`` … … 1755 1754 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1756 1755 1757 **New in Django development version.**1758 1759 1756 The problem with the way we wrote ``get_absolute_url()`` above is that it 1760 1757 slightly violates the DRY principle: the URL for this object is defined both django/branches/gis/docs/newforms.txt
r4526 r4853 10 10 ============== 11 11 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 13 with the 0.96 release. the Django development version -- i.e., it's 14 not available in the Django 0.95 release. For the next Django release, 15 our plan is to do the following: 15 16 16 17 * As of revision [4208], we've copied the current ``django.forms`` to django/branches/gis/docs/release_notes_0.96.txt
r4786 r4853 17 17 instead of needing to make incremental changes to keep up with the 18 18 development version of Django. 19 20 Backwards-incompatible changes 21 ============================== 22 23 The following changes may require you to update your code when you switch from 24 0.95 to 0.96: 25 26 ``MySQLdb`` version requirement 27 ------------------------------- 28 29 Due to a bug in older versions of the ``MySQLdb`` Python module (which 30 Django uses to connect to MySQL databases), Django's MySQL backend now 31 requires version 1.2.1p2 or higher of `MySQLdb`, and will raise 32 exceptions if you attempt to use an older version. 33 34 If you're currently unable to upgrade your copy of ``MySQLdb`` to meet 35 this requirement, a separate, backwards-compatible backend, called 36 "mysql_old", has been added to Django. To use this backend, change 37 the ``DATABASE_ENGINE`` setting in your Django settings file from 38 this:: 39 40 DATABASE_ENGINE = "mysql" 41 42 to this:: 43 44 DATABASE_ENGINE = "mysql_old" 45 46 However, we strongly encourage MySQL users to upgrade to a more recent 47 version of `MySQLdb` as soon as possible, The "mysql_old" backend is 48 provided only to ease this transition, and is considered deprecated; 49 aside from any necessary security fixes, it will not be actively 50 maintained, and it will be removed in a future release of Django. 51 52 Also, note that some features, like the new ``DATABASE_OPTIONS`` 53 setting (see the `databases documentation`_ for details), are only 54 available on the "mysql" backend, and will not be made available for 55 "mysql_old". 56 57 .. _databases documentation: ../databases/ 58 59 Database constraint names changed 60 --------------------------------- 61 62 The format of the constraint names Django generates for foreign key 63 references have changed slightly. These names are generally only used 64 when it is not possible to put the reference directly on the affected 65 column, so they is not always visible. 66 67 The effect of this change is that running ``manage.py reset`` and 68 similar commands against an existing database may generate SQL with 69 the new form of constraint name, while the database itself contains 70 constraints named in the old form; this will cause the database server 71 to raise an error message about modifying non-existent constraints. 72 73 If 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 83 Name changes in ``manage.py`` 84 ----------------------------- 85 86 A few of the options to ``manage.py`` have changed with the addition of fixture 87 support: 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 100 Backslash escaping changed 101 -------------------------- 102 103 The Django database API now escapes backslashes given as query parameters. If 104 you 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 106 slashes one level. 107 108 For example, this used to work:: 109 110 # Find text containing a single backslash 111 MyModel.objects.filter(text__contains='\\\\') 112 113 The above is now incorrect, and should be rewritten as:: 114 115 # Find text containing a single backslash 116 MyModel.objects.filter(text__contains='\\') 117 118 Removed ENABLE_PSYCO setting 119 ---------------------------- 120 121 The ``ENABLE_PSYCO`` setting no longer exists. If your settings file includes 122 ``ENABLE_PSYCO`` it will have no effect; to use Psyco_, we recommend 123 writing a middleware class to activate it. 124 125 .. _psyco: http://psyco.sourceforge.net/ 19 126 20 127 What's new in 0.96? … … 130 237 updating users have been added to the admin interface, so you no 131 238 longer need to worry about working with hashed passwords in the admin. 132 133 Backwards-incompatible changes134 ==============================135 136 The following changes may require you to update your code when you switch from137 0.95 to 0.96:138 139 `MySQLdb` version requirement140 -----------------------------141 142 Due to a bug in older versions of the `MySQLdb` Python module (which143 Django uses to connect to MySQL databases), Django's MySQL backend now144 requires version 1.2.1p2 or higher of `MySQLdb`, and will raise145 exceptions if you attempt to use an older version.146 147 If you're currently unable to upgrade your copy of `MySQLdb` to meet148 this requirement, a separate, backwards-compatible backend, called149 "mysql_old", has been added to Django. To use this backend, change150 the ``DATABASE_ENGINE`` setting in your Django settings file from151 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 recent160 version of `MySQLdb` as soon as possible, The "mysql_old" backend is161 provided only to ease this transition, and is considered deprecated;162 aside from any necessary security fixes, it will not be actively163 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 only167 available on the "mysql" backend, and will not be made available for168 "mysql_old".169 170 .. _databases: ../databases/171 172 Database constraint names changed173 ---------------------------------174 175 The format of the constraint names Django generates for foreign key176 references have changed slightly. These names are generally only used177 when it is not possible to put the reference directly on the affected178 column, so they is not always visible.179 180 The effect of this change is that running ``manage.py reset`` and181 similar commands against an existing database may generate SQL with182 the new form of constraint name, while the database itself contains183 constraints named in the old form; this will cause the database server184 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 the189 generated SQL to use the correct constraint names before190 executing it.191 192 2. Examine the output of ``manage.py sqlall`` to see the new-style193 constraint names, and use that as a guide to rename existing194 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 fixture200 support:201 202 * There are new ``dumpdata`` and ``loaddata`` commands which, as203 you might expect, will dump and load data to/from the204 database. These commands can operate against any of Django's205 supported serialization formats.206 207 * The ``sqlinitialdata`` command has been renamed to ``sqlcustom`` to208 emphasize that ``loaddata`` should be used for data (and ``sqlcustom`` for209 other custom SQL -- views, stored procedures, etc.).210 211 * The vestigial ``install`` command has been removed. Use ``syncdb``.212 213 Backslash escaping changed214 --------------------------215 216 The Django database API now escapes backslashes given as query parameters. If217 you have any database API code that matches backslashes, and it was working before218 (despite the lack of escaping), you'll have to change your code to "unescape" the219 slashes one level.220 221 For example, this used to work::222 223 # Find text containing a single backslash224 MyModel.objects.filter(text__contains='\\\\')225 226 The above is now incorrect, and should be rewritten as::227 228 # Find text containing a single backslash229 MyModel.objects.filter(text__contains='\\')230 231 Removed ENABLE_PSYCO setting232 ----------------------------233 234 The ``ENABLE_PSYCO`` setting no longer exists. If your settings file includes235 ``ENABLE_PSYCO`` it will have no effect; to use Psyco, we recommend236 writing a middleware class to activate it.237 238 .. _psyco: http://psyco.sourceforge.net/239 239 240 240 Thanks django/branches/gis/docs/request_response.txt
r4538 r4853 385 385 exist. 386 386 387 The ``path`` and ``domain`` arguments are new in the Django development version.388 387 Due to the way cookies work, ``path`` and ``domain`` should be the same 389 388 values you used in ``set_cookie()`` -- otherwise the cookie may not be deleted. django/branches/gis/docs/sessions.txt
r4420 r4853 266 266 --------------------- 267 267 268 **New in Django development version**269 270 268 Default: ``False`` 271 269 django/branches/gis/docs/settings.txt
r4786 r4853 429 429 FIXTURE_DIRS 430 430 ------------- 431 432 **New in Django development version**433 431 434 432 Default: ``()`` (Empty tuple) … … 717 715 --------------------- 718 716 719 **New in Django development version**720 721 717 Default: ``False`` 722 718 … … 813 809 ----------- 814 810 815 **New in Django development version**816 817 811 Default: ``'django.test.simple.run_tests'`` 818 812 … … 824 818 TEST_DATABASE_NAME 825 819 ------------------ 826 827 **New in Django development version**828 820 829 821 Default: ``None`` django/branches/gis/docs/templates.txt
r4669 r4853 113 113 ======== 114 114 115 **New in Django development version**116 117 115 To comment-out part of a template, use the comment syntax: ``{# #}``. 118 116 … … 254 252 completely overriding it. 255 253 256 * **New in Django development version:** For extra readability, you can257 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:: 258 256 259 257 {% block content %} … … 549 547 {% endfor %} 550 548 551 2. **New in Django development version.** If given a variable, check whether that552 variable has changed. For example, the following shows the date every time it553 changes, butonly shows the hour if both the hour and the date has changed::549 2. If given a variable, check whether that variable has changed. For 550 example, the following shows the date every time it changes, but 551 only shows the hour if both the hour and the date has changed:: 554 552 555 553 {% for date in days %} … … 829 827 ================== ======= 830 828 831 Note: ``opencomment`` and ``closecomment`` are new in the Django development version.832 833 829 url 834 830 ~~~ 835 836 **New in Django development version**837 831 838 832 **Note that the syntax for this tag may change in the future, as we make it more robust.** … … 976 970 * ``36.15`` gets converted to ``36.2`` 977 971 * ``36`` gets converted to ``36`` 978 979 **New in Django development version**980 972 981 973 If used with a numeric integer argument, ``floatformat`` rounds a number to that django/branches/gis/docs/testing.txt
r4786 r4853 2 2 Testing Django applications 3 3 =========================== 4 5 **New in Django development version**.6 4 7 5 Automated testing is an extremely useful weapon in the bug-killing arsenal django/branches/gis/docs/url_dispatch.txt
r4669 r4853 401 401 -------------------------------------- 402 402 403 **New in Django development version.**404 405 403 Similarly, you can pass extra options to ``include()``. When you pass extra 406 404 options to ``include()``, *each* line in the included URLconf will be passed … … 443 441 =========================================== 444 442 445 **New in Django development version.**446 447 443 Some developers find it more natural to pass the actual Python function object 448 444 rather than a string containing the path to its module. This alternative is
