Django

Code

Show
Ignore:
Timestamp:
03/30/07 06:49:28 (2 years ago)
Author:
utrebec
Message:

[full-history]
svnmerge: merging in revision(s) 4816,4818-4823,4825-4835,4837,4844-4850,4856-4868 from "http://code.djangoproject.com/svn/django/trunk"

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/full-history

    • Property svnmerge-integrated changed from /django/trunk:7,12-26,33-38,40,43,46-47,53,179-180,189,205,229,235,243,248-249,338,349,361-362,368-370,372-375,419-424,427-429,431,482,485-486,488-489,514,526,551-554,559,599-600,707-709,722-727,729-730,733,738-741,744,748-751,755-770,773,775-780,783,787-788,791,796-799,801-803,815-819,829-841,843-844,848,850-854,864,866,869,874-877,881-886,897-899,901,904,906-910,912-916,918-920,932-934,939,941-944,947,953,955-956,960-966,973-975,979-982,986-987,993-1003,1013-1015,1023-1024,1026-1029,1032,1040-1043,1045-1049,1055-1067,1069-1075,1079,1081-1082,1085-1086,1103,1125-1126,1128-1129,1138-1139,1144,1153-1154,1159-1160,1169,1175,1178,1180-1182,1186-1188,1190,1192,1198,1222-1223,1231,1235,1239-1240,1244-1246,1248,1254-1255,1264,1267-1269,1279-1280,1282,1284,1286-1290,1294,1299,1301,1308-1311,1321,1332-1338,1344-1345,1358,1361-1363,1365,1367,1372-1373,1375,1377,1382-1383,1386-1387,1389-1395,1408,1413-1415,1417,1419,1421,1424-1425,1427,1430-1431,1433,1501,1587,1592,1594-1610,1613-1629,1631-1642,1645-1659,1661,1663-1670,1672,1675,1677-1683,1687,1689,1691-1716,1718,1720-1722,1724-1731,1733-1734,1736-1741,1745-1748,1750-1757,1759-1760,1765,1767-1772,1775,1777,1780,1792,1794,1796-1797,1800-1807,1810,1818,1822-1824,1826-1831,1833,1835-1849,1854-1856,1862-1864,1866,1869-1870,1873-1874,1876-1877,1879,1884-1897,1902,1904,1914-1921,1932-1940,1944-1951,1954-1961,1965,1968,1972,1974,1977,1979,1981,1983,1987-2008,2011,2013,2015-2033,2035,2037-2045,2047-2048,2050-2055,2057,2060-2065,2067,2069-2075,2079-2097,2099-2116,2118,2121,2124-2130,2135,2137-2138,2140-2175,2177-2186,2188-2191,2193-2203,2205-2223,2225,2227,2232,2236-2238,2241-2270,2273-2281,2283-2293,2295-2296,2301,2303-2305,2307-2308,2310,2313-2315,2317-2318,2320,2324,2329-2330,2335,2339-2340,2344-2345,2351,2354-2355,2357,2360-2363,2366,2369-2370,2372-2374,2376-2377,2380-2388,2393-2412,2416,2418,2421-2425,2428-2443,2445-2446,2451-2452,2455,2457-2467,2469-2470,2472,2474-2475,2477-2508,2510-2521,2524-2527,2529-2530,2532,2534,2537-2542,2544,2546-2547,2549,2551-2552,2554-2557,2559-2568,2570-2571,2575-2577,2581,2583-2586,2589-2596,2598-2621,2625-2638,2641,2643-2644,2646-2647,2651,2653-2659,2661-2663,2666,2669,2671-2674,2676-2679,2682-2686,2688,2691-2693,2696-2697,2699-2718,2720-2745,2747-2752,2754-2808,2865,2882-2892,2918-2919,2921,2924-2926,2965-2966,2998,3005-3006,3008,3010-3011,3025,3027,3029,3032-3033,3052,3067,3080,3086,3106,3152-3155,3190,3198-3200,3216,3219,3222,3224,3227-3231,3233-3234,3238-3241,3258,3261-3267,3281,3288-3293,3303,3313-3316,3320,3330-3332,3334-3335,3351,3355,3361,3363-3370,3377-3391,3394,3412,3416-3419,3422-3430,3440-3444,3446-3448,3452-3453,3464,3486-3487,3491-3494,3502,3513-3515,3518-3519,3523,3529,3531-3537,3540-3541,3555-3557,3572-3574,3576,3578-3581,3583-3584,3586-3589,3591,3593-3596,3599,3609-3610,3614-3619,3621-3632,3636-4814 to /django/trunk:7,12-26,33-38,40,43,46-47,53,179-180,189,205,229,235,243,248-249,338,349,361-362,368-370,372-375,419-424,427-429,431,482,485-486,488-489,514,526,551-554,559,599-600,707-709,722-727,729-730,733,738-741,744,748-751,755-770,773,775-780,783,787-788,791,796-799,801-803,815-819,829-841,843-844,848,850-854,864,866,869,874-877,881-886,897-899,901,904,906-910,912-916,918-920,932-934,939,941-944,947,953,955-956,960-966,973-975,979-982,986-987,993-1003,1013-1015,1023-1024,1026-1029,1032,1040-1043,1045-1049,1055-1067,1069-1075,1079,1081-1082,1085-1086,1103,1125-1126,1128-1129,1138-1139,1144,1153-1154,1159-1160,1169,1175,1178,1180-1182,1186-1188,1190,1192,1198,1222-1223,1231,1235,1239-1240,1244-1246,1248,1254-1255,1264,1267-1269,1279-1280,1282,1284,1286-1290,1294,1299,1301,1308-1311,1321,1332-1338,1344-1345,1358,1361-1363,1365,1367,1372-1373,1375,1377,1382-1383,1386-1387,1389-1395,1408,1413-1415,1417,1419,1421,1424-1425,1427,1430-1431,1433,1501,1587,1592,1594-1610,1613-1629,1631-1642,1645-1659,1661,1663-1670,1672,1675,1677-1683,1687,1689,1691-1716,1718,1720-1722,1724-1731,1733-1734,1736-1741,1745-1748,1750-1757,1759-1760,1765,1767-1772,1775,1777,1780,1792,1794,1796-1797,1800-1807,1810,1818,1822-1824,1826-1831,1833,1835-1849,1854-1856,1862-1864,1866,1869-1870,1873-1874,1876-1877,1879,1884-1897,1902,1904,1914-1921,1932-1940,1944-1951,1954-1961,1965,1968,1972,1974,1977,1979,1981,1983,1987-2008,2011,2013,2015-2033,2035,2037-2045,2047-2048,2050-2055,2057,2060-2065,2067,2069-2075,2079-2097,2099-2116,2118,2121,2124-2130,2135,2137-2138,2140-2175,2177-2186,2188-2191,2193-2203,2205-2223,2225,2227,2232,2236-2238,2241-2270,2273-2281,2283-2293,2295-2296,2301,2303-2305,2307-2308,2310,2313-2315,2317-2318,2320,2324,2329-2330,2335,2339-2340,2344-2345,2351,2354-2355,2357,2360-2363,2366,2369-2370,2372-2374,2376-2377,2380-2388,2393-2412,2416,2418,2421-2425,2428-2443,2445-2446,2451-2452,2455,2457-2467,2469-2470,2472,2474-2475,2477-2508,2510-2521,2524-2527,2529-2530,2532,2534,2537-2542,2544,2546-2547,2549,2551-2552,2554-2557,2559-2568,2570-2571,2575-2577,2581,2583-2586,2589-2596,2598-2621,2625-2638,2641,2643-2644,2646-2647,2651,2653-2659,2661-2663,2666,2669,2671-2674,2676-2679,2682-2686,2688,2691-2693,2696-2697,2699-2718,2720-2745,2747-2752,2754-2808,2865,2882-2892,2918-2919,2921,2924-2926,2965-2966,2998,3005-3006,3008,3010-3011,3025,3027,3029,3032-3033,3052,3067,3080,3086,3106,3152-3155,3190,3198-3200,3216,3219,3222,3224,3227-3231,3233-3234,3238-3241,3258,3261-3267,3281,3288-3293,3303,3313-3316,3320,3330-3332,3334-3335,3351,3355,3361,3363-3370,3377-3391,3394,3412,3416-3419,3422-3430,3440-3444,3446-3448,3452-3453,3464,3486-3487,3491-3494,3502,3513-3515,3518-3519,3523,3529,3531-3537,3540-3541,3555-3557,3572-3574,3576,3578-3581,3583-3584,3586-3589,3591,3593-3596,3599,3609-3610,3614-3619,3621-3632,3636-4868
  • django/branches/full-history/docs/add_ons.txt

    r4815 r4869  
    99This code lives in ``django/contrib`` in the Django distribution. Here's a 
    1010rundown of the packages in ``contrib``: 
     11 
     12.. admonition:: Note 
     13 
     14    For most of these add-ons -- specifically, the add-ons that include either 
     15    models or template tags -- you'll need to add the package name (e.g., 
     16    ``'django.contrib.admin'``) to your ``INSTALLED_APPS`` setting and re-run 
     17    ``manage.py syncdb``. 
    1118 
    1219.. _"batteries included" philosophy: http://docs.python.org/tut/node12.html#batteries-included 
     
    148155====== 
    149156 
    150 A collection of template filters that implement these common markup languages: 
    151  
    152     * `Textile`_ 
    153     * `Markdown`_ 
    154     * `ReST (ReStructured Text)`_ 
    155  
    156 For documentation, read the source code in django/contrib/markup/templatetags/markup.py. 
     157A collection of template filters that implement common markup languages: 
     158 
     159    * ``textile`` -- implements `Textile`_ 
     160    * ``markdown`` -- implements `Markdown`_ 
     161    * ``restructuredtext`` -- implements `ReST (ReStructured Text)`_ 
     162 
     163In each case, the filter expects formatted markup as a string and returns a 
     164string representing the marked-up text. For example, the ``textile`` filter 
     165converts text that is marked-up in Textile format to HTML. 
     166 
     167To activate these filters, add ``'django.contrib.markup'`` to your 
     168``INSTALLED_APPS`` setting. Once you've done that, use ``{% load markup %}`` in 
     169a template, and you'll have access to these filters. For more documentation, 
     170read the source code in django/contrib/markup/templatetags/markup.py. 
    157171 
    158172.. _Textile: http://en.wikipedia.org/wiki/Textile_%28markup_language%29 
  • django/branches/full-history/docs/cache.txt

    r4732 r4869  
    6767 
    6868After installing Memcached itself, you'll need to install the Memcached Python 
    69 bindings. They're in a single Python module, memcache.py, available at 
    70 ftp://ftp.tummy.com/pub/python-memcached/ . If that URL is no longer valid, 
    71 just go to the Memcached Web site (http://www.danga.com/memcached/) and get the 
    72 Python bindings from the "Client APIs" section. 
     69bindings. Two versions of this are available. Choose and install *one* of the 
     70following modules: 
     71 
     72    * The fastest available option is a module called ``cmemcache``, available 
     73      at http://gijsbert.org/cmemcache/ . (This module is only compatible with 
     74      the Django development version. Django 0.96 is only compatible with the 
     75      second option, below.) 
     76 
     77    * If you can't install ``cmemcache``, you can install ``python-memcached``, 
     78      available at ftp://ftp.tummy.com/pub/python-memcached/ . If that URL is 
     79      no longer valid, just go to the Memcached Web site 
     80      (http://www.danga.com/memcached/) and get the Python bindings from the 
     81      "Client APIs" section. 
    7382 
    7483To use Memcached with Django, set ``CACHE_BACKEND`` to 
  • django/branches/full-history/docs/django-admin.txt

    r4815 r4869  
    343343``<appname>/sql/<modelname>.sql``, where ``<appname>`` is the given appname and 
    344344``<modelname>`` is the model's name in lowercase. For example, if you have an 
    345 app ``news`` that includes a ``Story`` model, ``sqlinitialdata`` will attempt 
     345app ``news`` that includes a ``Story`` model, ``sqlcustom`` will attempt 
    346346to read a file ``news/sql/story.sql`` and append it to the output of this 
    347347command. 
  • django/branches/full-history/docs/modpython.txt

    r4732 r4869  
    3838    </Location> 
    3939 
    40 ...and replace ``mysite.settings`` with the Python path to your settings file. 
     40...and replace ``mysite.settings`` with the Python import path to your Django 
     41project's settings file. 
    4142 
    4243This tells Apache: "Use mod_python for any URL at or under '/mysite/', using the 
  • django/branches/full-history/docs/newforms.txt

    r4815 r4869  
    861861    <tr><th>Comment:</th><td><input type="text" name="comment" /></td></tr> 
    862862 
     863Creating custom fields 
     864---------------------- 
     865 
     866If the built-in ``Field`` classes don't meet your needs, you can easily create 
     867custom ``Field`` classes. To do this, just create a subclass of 
     868``django.newforms.Field``. Its only requirements are that it implement a 
     869``clean()`` method and that its ``__init__()`` method accept the core arguments 
     870mentioned above (``required``, ``label``, ``initial``, ``widget``, 
     871``help_text``). 
     872 
    863873More coming soon 
    864874================ 
  • django/branches/full-history/docs/release_notes_0.96.txt

    r4815 r4869  
    6363references have changed slightly. These names are generally only used 
    6464when it is not possible to put the reference directly on the affected 
    65 column, so they is not always visible. 
     65column, so they are not always visible. 
    6666 
    6767The effect of this change is that running ``manage.py reset`` and 
  • django/branches/full-history/docs/sessions.txt

    r4815 r4869  
    159159 
    160160    >>> from django.contrib.sessions.models import Session 
    161     >>> s = Session.objects.get_object(pk='2b1189a188b44ad18c35e113ac6ceead') 
     161    >>> s = Session.objects.get(pk='2b1189a188b44ad18c35e113ac6ceead') 
    162162    >>> s.expire_date 
    163163    datetime.datetime(2005, 8, 20, 13, 35, 12) 
  • django/branches/full-history/docs/templates.txt

    r4815 r4869  
    738738            {% endfor %} 
    739739        </ul> 
     740        </li> 
    740741    {% endfor %} 
    741742    </ul> 
     
    873874which is rounded up to 88). 
    874875 
     876with 
     877~~~~ 
     878 
     879**New in Django development version** 
     880 
     881Caches a complex variable under a simpler name. This is useful when accessing 
     882an "expensive" method (e.g., one that hits the database) multiple times. 
     883 
     884For example:: 
     885 
     886    {% with business.employees.count as total %} 
     887        {{ total }} employee{{ total|pluralize }} 
     888    {% endwith %} 
     889 
     890The populated variable (in the example above, ``total``) is only available 
     891between the ``{% with %}`` and ``{% endwith %}`` tags. 
     892 
    875893Built-in filter reference 
    876894------------------------- 
     
    971989    * ``36`` gets converted to ``36`` 
    972990 
    973 If used with a numeric integer argument, ``floatformat`` rounds a number to that  
     991If used with a numeric integer argument, ``floatformat`` rounds a number to that 
    974992many decimal places.  For example: 
    975993 
     
    9841002    * ``36`` with floatformat:-4 gets converted to ``36`` 
    9851003 
    986 Using ``floatformat`` with no argument is equivalent to using ``floatformat`` with  
     1004Using ``floatformat`` with no argument is equivalent to using ``floatformat`` with 
    9871005an argument of ``-1``. 
    9881006 
  • django/branches/full-history/docs/testing.txt

    r4815 r4869  
    277277                     full list of HTTP status codes. 
    278278 
    279     ``content``      The body of the response. The is the final page 
     279    ``content``      The body of the response. This is the final page 
    280280                     content as rendered by the view, or any error message 
    281281                     (such as the URL for a 302 redirect). 
     
    469469    FAILED (failures=1) 
    470470 
    471 The return code for the script will indicate the number of tests that failed. 
     471The return code for the script is the total number of failed and erroneous  
     472tests. If all the tests pass, the return code is 0. 
    472473 
    473474Regardless of whether the tests pass or fail, the test database is destroyed when 
  • django/branches/full-history/docs/tutorial01.txt

    r4732 r4869  
    134134database's connection parameters: 
    135135 
    136     * ``DATABASE_ENGINE`` -- Either 'postgresql', 'mysql' or 'sqlite3'. 
    137       More coming soon
     136    * ``DATABASE_ENGINE`` -- Either 'postgresql_psycopg2', 'mysql' or 'sqlite3'. 
     137      Other backends are `also available`_
    138138    * ``DATABASE_NAME`` -- The name of your database, or the full (absolute) 
    139139      path to the database file if you're using SQLite. 
     
    144144      (not used for SQLite). 
    145145 
     146.. _also available: ../settings/ 
     147 
    146148.. admonition:: Note 
    147149 
     
    320322    python manage.py sql polls 
    321323 
    322 You should see the following (the CREATE TABLE SQL statements for the polls app):: 
     324You should see something similar to the following (the CREATE TABLE SQL statements  
     325for the polls app):: 
    323326 
    324327    BEGIN; 
     
    338341Note the following: 
    339342 
     343    * The exact output will vary depending on the database you are using. 
     344     
    340345    * Table names are automatically generated by combining the name of the app 
    341346      (``polls``) and the lowercase name of the model -- ``poll`` and 
     
    366371      construction of your models. 
    367372 
    368     * ``python manage.py sqlinitialdata polls`` -- Outputs any initial data 
    369       required for Django's admin framework and your models. 
     373    * ``python manage.py sqlcustom polls`` -- Outputs any custom SQL statements 
     374      (such as table modifications or constraints) that are defined for the  
     375      application.  
    370376 
    371377    * ``python manage.py sqlclear polls`` -- Outputs the necessary ``DROP