Django

Code

Show
Ignore:
Timestamp:
01/31/07 17:43:09 (2 years ago)
Author:
rmunn
Message:

Merged revisions 4186 to 4454 from trunk.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/sqlalchemy/docs/add_ons.txt

    r4186 r4455  
    1818`Tutorial 2`_. 
    1919 
    20 .. _Tutorial 2: http://www.djangoproject.com/documentation/tutorial2/ 
     20.. _Tutorial 2: ../tutorial2/ 
    2121 
    2222auth 
     
    2727See the `authentication documentation`_. 
    2828 
    29 .. _authentication documentation: http://www.djangoproject.com/documentation/authentication/ 
     29.. _authentication documentation: ../authentication/ 
    3030 
    3131comments 
     
    4747See the `csrf documentation`_. 
    4848 
    49 .. _csrf documentation: http://www.djangoproject.com/documentation/csrf/ 
     49.. _csrf documentation: ../csrf/ 
    5050 
    5151formtools 
     
    138138See the `flatpages documentation`_. 
    139139 
    140 .. _flatpages documentation: http://www.djangoproject.com/documentation/flatpages/ 
     140.. _flatpages documentation: ../flatpages/ 
    141141 
    142142markup 
     
    158158See the `redirects documentation`_. 
    159159 
    160 .. _redirects documentation: http://www.djangoproject.com/documentation/redirects/ 
     160.. _redirects documentation: ../redirects/ 
    161161 
    162162sites 
     
    169169See the `sites documentation`_. 
    170170 
    171 .. _sites documentation: http://www.djangoproject.com/documentation/sites/ 
     171.. _sites documentation: ../sites/ 
    172172 
    173173sitemaps 
     
    178178See the `sitemaps documentation`_. 
    179179 
    180 .. _sitemaps documentation: http://www.djangoproject.com/documentation/sitemaps/ 
     180.. _sitemaps documentation: ../sitemaps/ 
    181181 
    182182syndication 
     
    187187See the `syndication documentation`_. 
    188188 
    189 .. _syndication documentation: http://www.djangoproject.com/documentation/syndication/ 
     189.. _syndication documentation: ../syndication/ 
    190190 
    191191Other add-ons 
  • django/branches/sqlalchemy/docs/apache_auth.txt

    r3918 r4455  
    6666    PythonOption DJANGO_SETTINGS_MODULE mysite.settings 
    6767 
    68 .. _authentication system: http://www.djangoproject.com/documentation/authentication/ 
     68.. _authentication system: ../authentication/ 
    6969.. _Subversion: http://subversion.tigris.org/ 
    7070.. _mod_dav: http://httpd.apache.org/docs/2.0/mod/mod_dav.html 
    71 .. _custom permissions: http://www.djangoproject.com/documentation/authentication/#custom-permissions 
     71.. _custom permissions: ../authentication/#custom-permissions 
  • django/branches/sqlalchemy/docs/api_stability.txt

    r3918 r4455  
    9999     there will at least be moderate changes. 
    100100      
    101 .. _caching: http://www.djangoproject.com/documentation/cache/ 
    102 .. _custom template tags and libraries: http://www.djangoproject.com/documentation/templates_python/ 
    103 .. _database lookup: http://www.djangoproject.com/documentation/db_api/ 
    104 .. _django-admin utility: http://www.djangoproject.com/documentation/django_admin/ 
    105 .. _fastcgi integration: http://www.djangoproject.com/documentation/fastcgi/ 
    106 .. _flatpages: http://www.djangoproject.com/documentation/flatpages/ 
    107 .. _generic views: http://www.djangoproject.com/documentation/generic_views/ 
    108 .. _internationalization: http://www.djangoproject.com/documentation/i18n/ 
    109 .. _legacy database integration: http://www.djangoproject.com/documentation/legacy_databases/ 
    110 .. _model definition: http://www.djangoproject.com/documentation/model_api/ 
    111 .. _mod_python integration: http://www.djangoproject.com/documentation/modpython/ 
    112 .. _redirects: http://www.djangoproject.com/documentation/redirects/ 
    113 .. _request/response objects: http://www.djangoproject.com/documentation/request_response/ 
    114 .. _sending email: http://www.djangoproject.com/documentation/email/ 
    115 .. _sessions: http://www.djangoproject.com/documentation/sessions/ 
    116 .. _settings: http://www.djangoproject.com/documentation/settings/ 
    117 .. _syndication: http://www.djangoproject.com/documentation/syndication/ 
    118 .. _template language: http://www.djangoproject.com/documentation/templates/ 
    119 .. _transactions: http://www.djangoproject.com/documentation/transactions/ 
    120 .. _url dispatch: http://www.djangoproject.com/documentation/url_dispatch/ 
    121 .. _forms and validation: http://www.djangoproject.com/documentation/forms/ 
    122 .. _serialization: http://www.djangoproject.com/documentation/serialization/ 
    123 .. _authentication: http://www.djangoproject.com/documentation/authentication/ 
     101.. _caching: ../cache/ 
     102.. _custom template tags and libraries: ../templates_python/ 
     103.. _database lookup: ../db_api/ 
     104.. _django-admin utility: ../django_admin/ 
     105.. _fastcgi integration: ../fastcgi/ 
     106.. _flatpages: ../flatpages/ 
     107.. _generic views: ../generic_views/ 
     108.. _internationalization: ../i18n/ 
     109.. _legacy database integration: ../legacy_databases/ 
     110.. _model definition: ../model_api/ 
     111.. _mod_python integration: ../modpython/ 
     112.. _redirects: ../redirects/ 
     113.. _request/response objects: ../request_response/ 
     114.. _sending email: ../email/ 
     115.. _sessions: ../sessions/ 
     116.. _settings: ../settings/ 
     117.. _syndication: ../syndication/ 
     118.. _template language: ../templates/ 
     119.. _transactions: ../transactions/ 
     120.. _url dispatch: ../url_dispatch/ 
     121.. _forms and validation: ../forms/ 
     122.. _serialization: ../serialization/ 
     123.. _authentication: ../authentication/ 
  • django/branches/sqlalchemy/docs/authentication.txt

    r4054 r4455  
    145145      doesn't allow profiles. 
    146146 
    147 .. _Django model: http://www.djangoproject.com/documentation/model_api/ 
    148 .. _DEFAULT_FROM_EMAIL: http://www.djangoproject.com/documentation/settings/#default-from-email 
     147.. _Django model: ../model_api/ 
     148.. _DEFAULT_FROM_EMAIL: ../settings/#default-from-email 
    149149 
    150150Manager functions 
     
    272272        # Do something for anonymous users. 
    273273 
    274 .. _request objects: http://www.djangoproject.com/documentation/request_response/#httprequest-objects 
    275 .. _session documentation: http://www.djangoproject.com/documentation/sessions/ 
     274.. _request objects: ../request_response/#httprequest-objects 
     275.. _session documentation: ../sessions/ 
    276276 
    277277How to log a user in 
     
    442442    {% endblock %} 
    443443 
    444 .. _forms documentation: http://www.djangoproject.com/documentation/forms/ 
    445 .. _site framework docs: http://www.djangoproject.com/documentation/sites/ 
     444.. _forms documentation: ../forms/ 
     445.. _site framework docs: ../sites/ 
    446446 
    447447Limiting access to logged-in users that pass a test 
     
    545545        return object_detail(*args, **kwargs) 
    546546 
    547 .. _generic view: http://www.djangoproject.com/documentation/generic_views/ 
     547.. _generic view: ../generic_views/ 
    548548 
    549549Permissions 
     
    607607``syncdb``. 
    608608 
    609 .. _model Meta attribute: http://www.djangoproject.com/documentation/model_api/#meta-options 
     609.. _model Meta attribute: ../model_api/#meta-options 
    610610 
    611611API reference 
     
    646646   For more, see the `RequestContext docs`_. 
    647647 
    648    .. _RequestContext docs: http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext 
     648   .. _RequestContext docs: ../templates_python/#subclassing-context-requestcontext 
    649649 
    650650Users 
     
    692692    {% endif %} 
    693693 
    694 .. _template context: http://www.djangoproject.com/documentation/templates_python/ 
     694.. _template context: ../templates_python/ 
    695695 
    696696Groups 
     
    757757database. To send messages to anonymous users, use the `session framework`_. 
    758758 
    759 .. _session framework: http://www.djangoproject.com/documentation/sessions/ 
     759.. _session framework: ../sessions/ 
    760760 
    761761Other authentication sources 
  • django/branches/sqlalchemy/docs/cache.txt

    r3604 r4455  
    251251See the `middleware documentation`_ for more on middleware. 
    252252 
    253 .. _`middleware documentation`: http://www.djangoproject.com/documentation/middleware/ 
     253.. _`middleware documentation`: ../middleware/ 
    254254 
    255255The per-view cache 
  • django/branches/sqlalchemy/docs/contributing.txt

    r3918 r4455  
    2323      back it up. 
    2424 
     25    * Triage patches that have been submitted by other users. Please read 
     26      `Ticket triage`_ below, for details on the triage process. 
     27 
    2528That's all you need to know if you'd like to join the Django development 
    2629community. The rest of this document describes the details of how our community 
     
    4548    * **Do** write complete, reproducible, specific bug reports. Include as 
    4649      much information as you possibly can, complete with code snippets, test 
    47       cases, etc.  A minimal example that illustrates the bug in a nice small 
    48       test case is the best possible bug report. 
     50      cases, etc. This means including a clear, concise description of the 
     51      problem, and a clear set of instructions for replicating the problem. 
     52      A minimal example that illustrates the bug in a nice small test case 
     53      is the best possible bug report. 
    4954 
    5055    * **Don't** use the ticket system to ask support questions.  Use the 
     
    118123      tracker apply correct syntax highlighting, which is quite helpful. 
    119124 
    120     * Put the prefix "[patch] " before the title of your ticket. This will make 
    121       it obvious that the ticket includes a patch, and it will add the ticket 
    122       to the `list of tickets with patches`_. 
     125    * Check the "Has patch" box on the ticket details. This will make it 
     126      obvious that the ticket includes a patch, and it will add the ticket to 
     127      the `list of tickets with patches`_. 
     128 
     129    * The code required to fix a problem or add a feature is an essential part 
     130      of a patch, but it is not the only part. A good patch should also include 
     131      a regression test to validate the behavior that has been fixed (and prevent 
     132      the problem from arising again). 
     133 
     134    * If the code associated with a patch adds a new feature, or modifies behavior 
     135      of an existing feature, the patch should also contain documentation. 
     136 
     137Non-trivial patches 
     138------------------- 
     139 
     140A "non-trivial" patch is one that is more than a simple bug fix. It's a patch 
     141that introduces Django functionality and makes some sort of design decision. 
     142 
     143If you provide a non-trivial patch, include evidence that alternatives have 
     144been discussed on `django-developers`_. If you're not sure whether your patch 
     145should be considered non-trivial, just ask. 
     146 
     147Ticket triage 
     148============= 
     149 
     150Unfortunately, not all bug reports in the `ticket tracker`_ provide all 
     151the `required details`_. A number of tickets have patches, but those patches 
     152don't meet all the requirements of a `good patch`_. 
     153 
     154One way to help out is to *triage* bugs that have been reported by other 
     155users. A couple of dedicated volunteers work on this regularly, but more help 
     156is always appreciated. 
     157 
     158Most of the workflow is based around the concept of a ticket's "triage stage". 
     159This stage describes where in its lifetime a given ticket is at any time. 
     160Along with a handful of flags, this field easily tells us what and who each 
     161ticket is waiting on. 
     162 
     163Since a picture is worth a thousand words, let's start there: 
     164 
     165.. image:: http://media.djangoproject.com/img/doc/djangotickets.png 
     166   :height: 451 
     167   :width: 590 
     168   :alt: Django's ticket workflow 
     169 
     170We've got two roles here: 
     171 
     172    * Core developers: people with commit access who make the decisions and 
     173      write the bulk of the code. 
     174 
     175    * Ticket triagers: community members who keep track of tickets, making 
     176      sure the tickets are always categorized correctly. 
     177 
     178Second, note the four triage stages: 
     179 
     180    1. A ticket starts as "Unreviewed", meaning that a triager has yet to 
     181       examine the ticket and move it along. 
     182 
     183    2. "Design decision needed" means "this concept requires a design 
     184       decision," which should be discussed either in the ticket comments or on 
     185       django-developers. 
     186 
     187    3. Once a ticket is ruled to be approved for fixing, it's moved into the 
     188       "Accepted" stage. This stage is where all the real work gets done. 
     189 
     190    4. If a ticket has an associated patch (see below), a triager will review the 
     191       patch. If the patch is complete, it'll be marked as "ready for checkin" so 
     192       that a core developer knows to review and check in the patches. 
     193 
     194The second part of this workflow involves a set of flags the describe what the 
     195ticket has or needs in order to be "ready for checkin": 
     196 
     197    "Has patch" 
     198        The means the ticket has an associated patch_. These will be 
     199        reviewed to see if the patch is "good". 
     200 
     201    "Needs documentation" 
     202        This flag is used for tickets with patches that need associated 
     203        documentation. Complete documentation of features is a prerequisite 
     204        before we can check a fix into the codebase. 
     205 
     206    "Needs tests" 
     207        This flags the patch as needing associated unit tests. Again, this is a 
     208        required part of a valid patch. 
     209 
     210    "Patch needs improvement" 
     211        This flag means that although the ticket *has* a patch, it's not quite 
     212        ready for checkin. This could mean the patch no longer applies 
     213        cleanly, or that the code doesn't live up to our standards. 
     214 
     215.. _required details: `Reporting bugs`_ 
     216.. _good patch: `Patch style`_ 
     217.. _patch: `Submitting patches`_ 
    123218 
    124219Submitting and maintaining translations 
     
    138233 
    139234.. _Django i18n mailing list: http://groups.google.com/group/django-i18n/ 
    140 .. _i18n documentation: http://www.djangoproject.com/documentation/i18n/ 
     235.. _i18n documentation: ../i18n/ 
    141236 
    142237Coding style 
     
    263358how to write new tests. 
    264359 
    265 .. _Testing Django applications: http://www.djangoproject.com/documentation/testing/ 
     360.. _Testing Django applications: ../testing/ 
    266361 
    267362Running the unit tests 
     
    339434-------------- 
    340435 
    341 To test a given branch, you can simply check out the entire branch, like so:: 
     436To use a branch, you'll need to do two things: 
     437 
     438    * Get the branch's code through Subversion. 
     439 
     440    * Point your Python ``site-packages`` directory at the branch's version of 
     441      the ``django`` package rather than the version you already have 
     442      installed. 
     443 
     444Getting the code from Subversion 
     445~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     446 
     447To get the latest version of a branch's code, check it out using Subversion:: 
    342448 
    343449    svn co http://code.djangoproject.com/svn/django/branches/<branch>/ 
    344450 
    345 Or, if you've got a working directory you'd like to switch to use a branch, 
    346 you can use:: 
     451...where ``<branch>`` is the branch's name. See the `list of branch names`_. 
     452 
     453Alternatively, you can automatically convert an existing directory of the 
     454Django source code as long as you've checked it out via Subversion. To do the 
     455conversion, execute this command from within your ``django`` directory:: 
    347456 
    348457    svn switch http://code.djangoproject.com/svn/django/branches/<branch>/ 
    349  
    350 ...in the root of your Django sandbox (the directory that contains ``django``, 
    351 ``docs``, and ``tests``). 
    352458 
    353459The advantage of using ``svn switch`` instead of ``svn co`` is that the 
    354460``switch`` command retains any changes you might have made to your local copy 
    355 of the code. It attempts to merge those changes into the "switched" code. 
     461of the code. It attempts to merge those changes into the "switched" code. The 
     462disadvantage is that it may cause conflicts with your local changes if the 
     463"switched" code has altered the same lines of code. 
     464 
     465(Note that if you use ``svn switch``, you don't need to point Python at the new 
     466version, as explained in the next section.) 
     467 
     468.. _list of branch names: http://code.djangoproject.com/browser/django/branches 
     469 
     470Pointing Python at the new Django version 
     471~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     472 
     473Once you've retrieved the branch's code, you'll need to change your Python 
     474``site-packages`` directory so that it points to the branch version of the 
     475``django`` directory. (The ``site-packages`` directory is somewhere such as 
     476``/usr/lib/python2.4/site-packages`` or 
     477``/usr/local/lib/python2.4/site-packages`` or ``C:\Python\site-packages``.) 
     478 
     479The simplest way to do this is by renaming the old ``django`` directory to 
     480``django.OLD`` and moving the trunk version of the code into the directory 
     481and calling it ``django``. 
     482 
     483Alternatively, you can use a symlink called ``django`` that points to the 
     484location of the branch's ``django`` package. If you want to switch back, just 
     485change the symlink to point to the old code. 
     486 
     487If you're using Django 0.95 or earlier and installed it using 
     488``python setup.py install``, you'll have a directory called something like 
     489``Django-0.95-py2.4.egg`` instead of ``django``. In this case, edit the file 
     490``setuptools.pth`` and remove the line that references the Django ``.egg`` 
     491file. Then copy the branch's version of the ``django`` directory into 
     492``site-packages``. 
    356493 
    357494Official releases 
     
    458595.. _django-users: http://groups.google.com/group/django-users 
    459596.. _`#django`: irc://irc.freenode.net/django 
    460 .. _list of tickets with patches: http://code.djangoproject.com/report/12 
     597.. _list of tickets with patches: http://code.djangoproject.com/query?status=new&status=assigned&status=reopened&has_patch=1&order=priority 
    461598.. _PEP 8: http://www.python.org/peps/pep-0008.html 
    462 .. _i18n documentation: http://www.djangoproject.com/documentation/i18n/ 
    463599.. _i18n branch: http://code.djangoproject.com/browser/django/branches/i18n 
    464600.. _`tags/releases`: http://code.djangoproject.com/browser/django/tags/releases 
  • django/branches/sqlalchemy/docs/csrf.txt

    r2980 r4455  
    11===================================== 
    2 Cross Site Request Forgery Protection 
     2Cross Site Request Forgery protection 
    33===================================== 
    44 
    5 The CsrfMiddleware class provides easy-to-use protection against  
    6 `Cross Site Request Forgeries`_.  This type of attack occurs when a malicious  
     5The CsrfMiddleware class provides easy-to-use protection against 
     6`Cross Site Request Forgeries`_.  This type of attack occurs when a malicious 
    77web site creates a link or form button that is intended to perform some action 
    88on your web site, using the credentials of a logged-in user who is tricked 
     
    1313middleware into your list of installed middleware. 
    1414 
    15  
    1615.. _Cross Site Request Forgeries:  http://www.squarefree.com/securitytips/web-developers.html#CSRF 
    1716 
    1817How to use it 
    1918============= 
    20 Add the middleware ``'django.contrib.csrf.middleware.CsrfMiddleware'`` to  
     19 
     20Add the middleware ``'django.contrib.csrf.middleware.CsrfMiddleware'`` to 
    2121your list of middleware classes, ``MIDDLEWARE_CLASSES``. It needs to process 
    2222the response after the SessionMiddleware, so must come before it in the 
     
    2626How it works 
    2727============ 
     28 
    2829CsrfMiddleware does two things: 
    2930 
    30 1. It modifies outgoing requests by adding a hidden form field to all  
    31    'POST' forms, with the name 'csrfmiddlewaretoken' and a value which is  
    32    a hash of the session ID plus a secret. If there is no session ID set,  
    33    this modification of the response isn't done, so there is very little  
     311. It modifies outgoing requests by adding a hidden form field to all 
     32   'POST' forms, with the name 'csrfmiddlewaretoken' and a value which is 
     33   a hash of the session ID plus a secret. If there is no session ID set, 
     34   this modification of the response isn't done, so there is very little 
    3435   performance penalty for those requests that don't have a session. 
    3536 
    36 2. On all incoming POST requests that have the session cookie set, it  
    37    checks that the 'csrfmiddlewaretoken' is present and correct. If it  
     372. On all incoming POST requests that have the session cookie set, it 
     38   checks that the 'csrfmiddlewaretoken' is present and correct. If it 
    3839   isn't, the user will get a 403 error. 
    3940 
     
    4445POST forms). GET requests ought never to have side effects (if you are 
    4546using HTTP GET and POST correctly), and so a CSRF attack with a GET 
    46 request will always be harmless.  
     47request will always be harmless. 
    4748 
    4849POST requests that are not accompanied by a session cookie are not protected, 
     
    5051could make these kind of requests anyway. 
    5152 
    52 The Content-Type is checked before modifying the response, and only  
     53The Content-Type is checked before modifying the response, and only 
    5354pages that are served as 'text/html' or 'application/xml+xhtml' 
    5455are modified. 
     
    5657Limitations 
    5758=========== 
     59 
    5860CsrfMiddleware requires Django's session framework to work. If you have 
    5961a custom authentication system that manually sets cookies and the like, 
    6062it won't help you. 
    6163 
    62 If your app creates HTML pages and forms in some unusual way, (e.g.  
    63 it sends fragments of HTML in javascript document.write statements)  
    64 you might bypass the filter that adds the hidden field to the form,  
     64If your app creates HTML pages and forms in some unusual way, (e.g. 
     65it sends fragments of HTML in javascript document.write statements) 
     66you might bypass the filter that adds the hidden field to the form, 
    6567in which case form submission will always fail.  It may still be possible 
    6668to use the middleware, provided you can find some way to get the 
    6769CSRF token and ensure that is included when your form is submitted. 
    68  
  • django/branches/sqlalchemy/docs/db-api.txt

    r3918 r4455  
    144144 
    145145    * If the object's primary key attribute is set to a value that evaluates to 
    146       ``False`` (such as ``None`` or the empty string), Django executes a 
    147       ``SELECT`` query to determine whether a record with the given primary key 
    148       already exists. 
     146      ``True`` (i.e., a value other than ``None`` or the empty string), Django  
     147      executes a ``SELECT`` query to determine whether a record with the given  
     148      primary key already exists. 
    149149    * If the record with the given primary key does already exist, Django 
    150150      executes an ``UPDATE`` query. 
     
    526526    >>> Entry.objects.filter(headline__contains='Lennon').dates('pub_date', 'day') 
    527527    [datetime.datetime(2005, 3, 20)] 
     528     
     529``none()`` 
     530~~~~~~~~~~ 
     531 
     532**New in Django development version** 
     533 
     534Returns an ``EmptyQuerySet`` -- a ``QuerySet`` that always evaluates to  
     535an empty list. This can be used in cases where you know that you should 
     536return an empty result set and your caller is expecting a ``QuerySet`` 
     537object (instead of returning an empty list, for example.) 
     538 
     539Examples:: 
     540     
     541    >>> Entry.objects.none() 
     542    [] 
    528543 
    529544``select_related()`` 
     
    17051720returns the height (or width) of the image, as an integer, in pixels. 
    17061721 
     1722Shortcuts 
     1723========= 
     1724 
     1725As you develop views, you will discover a number of common idioms in the 
     1726way you use the database API. Django encodes some of these idioms as 
     1727shortcuts that can be used to simplify the process of writing views. 
     1728 
     1729get_object_or_404() 
     1730------------------- 
     1731 
     1732One common idiom to use ``get()`` and raise ``Http404`` if the 
     1733object doesn't exist. This idiom is captured by ``get_object_or_404()``.  
     1734This function takes a Django model as its first argument and an  
     1735arbitrary number of keyword arguments, which it passes to the manager's  
     1736``get()`` function. It raises ``Http404`` if the object doesn't 
     1737exist. For example::  
     1738     
     1739    # Get the Entry with a primary key of 3 
     1740    e = get_object_or_404(Entry, pk=3) 
     1741 
     1742When you provide a model to this shortcut function, the default manager  
     1743is used to execute the underlying ``get()`` query. If you don't want to  
     1744use the default manager, or you want to search a list of related objects,  
     1745you can provide ``get_object_or_404()`` with a manager object, instead.  
     1746For example:: 
     1747 
     1748    # Get the author of blog instance `e` with a name of 'Fred' 
     1749    a = get_object_or_404(e.authors, name='Fred') 
     1750 
     1751    # Use a custom manager 'recent_entries' in the search for an 
     1752    # entry with a primary key of 3 
     1753    e = get_object_or_404(Entry.recent_entries, pk=3) 
     1754 
     1755get_list_or_404() 
     1756----------------- 
     1757 
     1758``get_list_or_404`` behaves the same was as ``get_object_or_404()``  
     1759-- except the it uses using ``filter()`` instead of ``get()``. It raises  
     1760``Http404`` if the list is empty. 
     1761 
    17071762Falling back to raw SQL 
    17081763======================= 
  • django/branches/sqlalchemy/docs/design_philosophies.txt

    r3438 r4455  
    187187This is the philosophy behind `template inheritance`_. 
    188188 
    189 .. _template inheritance: http://www.djangoproject.com/documentation/templates/#template-inheritance 
     189.. _template inheritance: ../templates/#template-inheritance 
    190190 
    191191Be decoupled from HTML 
  • django/branches/sqlalchemy/docs/django-admin.txt

    r3918 r4455  
    5454your admin's index page. See `Tutorial 2`_ for more information. 
    5555 
    56 .. _Tutorial 2: http://www.djangoproject.com/documentation/tutorial2/ 
     56.. _Tutorial 2: ../tutorial2/ 
    5757 
    5858createcachetable [tablename] 
     
    6262backend.  See the `cache documentation`_ for more information. 
    6363 
    64 .. _cache documentation: http://www.djangoproject.com/documentation/cache/ 
     64.. _cache documentation: ../cache/ 
    6565 
    6666dbshell 
     
    191191documentation. 
    192192 
    193 .. _serving static files: http://www.djangoproject.com/documentation/static_files/ 
     193.. _serving static files: ../static_files/ 
    194194 
    195195Turning off auto-reload 
     
    254254tables with any necessary initial records, SQL functions or test data. 
    255255 
     256Note that the order in which the SQL files are processed is undefined. 
     257 
    256258sqlreset [appname appname ...] 
    257259-------------------------------------- 
     
    381383    django-admin.py syncdb --verbosity=2 
    382384 
    383 Verbosity determines the amount of notification and debug information that  
     385Verbosity determines the amount of notification and debug information that 
    384386will be printed to the console. '0' is no output, '1' is normal output, 
    385387and `2` is verbose output. 
  • django/branches/sqlalchemy/docs/email.txt

    r2901 r4455  
    102102This method exists for convenience and readability. 
    103103 
    104 .. _ADMINS setting: http://www.djangoproject.com/documentation/settings/#admins 
    105 .. _EMAIL_SUBJECT_PREFIX setting: http://www.djangoproject.com/documentation/settings/#email-subject-prefix 
    106 .. _SERVER_EMAIL setting: http://www.djangoproject.com/documentation/settings/#server-email 
     104.. _ADMINS setting: ../settings/#admins 
     105.. _EMAIL_SUBJECT_PREFIX setting: ../settings/#email-subject-prefix 
     106.. _SERVER_EMAIL setting: ../settings/#server-email 
    107107 
    108108mail_managers() function 
     
    115115    mail_managers(subject, message, fail_silently=False) 
    116116 
    117 .. _MANAGERS setting: http://www.djangoproject.com/documentation/settings/#managers 
     117.. _MANAGERS setting: ../settings/#managers 
    118118 
    119119Examples 
  • django/branches/sqlalchemy/docs/faq.txt

    r3918 r4455  
    6464application layer. And it ships with a simple-yet-powerful `cache framework`_. 
    6565 
    66 .. _`cache framework`: http://www.djangoproject.com/documentation/cache/ 
     66.. _`cache framework`: ../cache/ 
    6767 
    6868Who's behind this? 
     
    192192We've documented our philosophies on the `design philosophies page`_. 
    193193 
    194 .. _design philosophies page: http://www.djangoproject.com/documentation/design_philosophies/ 
     194.. _design philosophies page: ../design_philosophies/ 
    195195 
    196196Do you have any of those nifty "screencast" things? 
     
    278278 
    279279.. _`Download the code`: http://www.djangoproject.com/download/ 
    280 .. _`installation guide`: http://www.djangoproject.com/documentation/install/ 
    281 .. _tutorial:  http://www.djangoproject.com/documentation/tutorial1/ 
    282 .. _documentation: http://www.djangoproject.com/documentation
     280.. _`installation guide`: ../install/ 
     281.. _tutorial:  ../tutorial1/ 
     282.. _documentation: ..
    283283.. _ask questions: http://www.djangoproject.com/community/ 
    284284 
     
    338338 
    339339.. _WSGI: http://www.python.org/peps/pep-0333.html 
    340 .. _How to use Django with FastCGI: http://www.djangoproject.com/documentation/fastcgi/ 
     340.. _How to use Django with FastCGI: ../fastcgi/ 
    341341.. _server arrangements wiki page: http://code.djangoproject.com/wiki/ServerArrangements 
    342342 
     
    465465Yes. See `Integrating with a legacy database`_. 
    466466 
    467 .. _`Integrating with a legacy database`: http://www.djangoproject.com/documentation/legacy_databases/ 
     467.. _`Integrating with a legacy database`: ../legacy_databases/ 
    468468 
    469469If I make changes to a model, how do I update the database? 
     
    512512contain arbitrary SQL, so you can make any sorts of changes you need to make. 
    513513 
    514 .. _SQL initial data file: http://www.djangoproject.com/documentation/model_api/#providing-initial-sql-data 
     514.. _SQL initial data file: ../model_api/#providing-initial-sql-data 
    515515 
    516516Why is Django leaking memory? 
     
    593593documentation. 
    594594 
    595 .. _serving the admin files: http://www.djangoproject.com/documentation/modpython/#serving-the-admin-files 
     595.. _serving the admin files: ../modpython/#serving-the-admin-files 
    596596 
    597597My "list_filter" contains a ManyToManyField, but the filter doesn't display. 
     
    631631`guide to the CSS used in the admin`_ to get you started. 
    632632 
    633 .. _`guide to the CSS used in the admin`: http://www.djangoproject.com/documentation/admin_css/ 
     633.. _`guide to the CSS used in the admin`: ../admin_css/ 
    634634 
    635635How do I create users without having to edit password hashes? 
     
    641641You can also use the Python API. See `creating users`_ for full info. 
    642642 
    643 .. _creating users: http://www.djangoproject.com/documentation/authentication/#creating-users 
     643.. _creating users: ../authentication/#creating-users 
    644644 
    645645Contributing code 
     
    652652It's titled `Contributing to Django`_. 
    653653 
    654 .. _Contributing to Django: http://www.djangoproject.com/documentation/contributing/ 
     654.. _Contributing to Django: ../contributing/ 
    655655 
    656656I submitted a bug fix in the ticket system several weeks ago. Why are you ignoring my patch? 
  • django/branches/sqlalchemy/docs/fastcgi.txt

    r3770 r4455  
    1818persistent process. 
    1919 
    20 .. _current preferred setup: http://www.djangoproject.com/documentation/modpython/ 
     20.. _current preferred setup: ../modpython/ 
    2121.. _Apache: http://httpd.apache.org/ 
    2222.. _mod_python: http://www.modpython.org/ 
  • django/branches/sqlalchemy/docs/flatpages.txt

    r2813 r4455  
    3030    3. Run the command ``manage.py syncdb``. 
    3131 
    32 .. _INSTALLED_APPS: http://www.djangoproject.com/documentation/settings/#installed-apps 
    33 .. _MIDDLEWARE_CLASSES: http://www.djangoproject.com/documentation/settings/#middleware-classes 
     32.. _INSTALLED_APPS: ../settings/#installed-apps 
     33.. _MIDDLEWARE_CLASSES: ../settings/#middleware-classes 
    3434 
    3535How it works 
     
    6464For more on middleware, read the `middleware docs`_. 
    6565 
    66 .. _SITE_ID: http://www.djangoproject.com/documentation/settings/#site-id 
    67 .. _RequestContext: http://www.djangoproject.com/documentation/templates_python/#subclassing-context-djangocontext 
    68 .. _middleware docs: http://www.djangoproject.com/documentation/middleware/ 
     66.. _SITE_ID: ../settings/#site-id 
     67.. _RequestContext: ../templates_python/#subclassing-context-djangocontext 
     68.. _middleware docs: ../middleware/ 
    6969 
    7070How to add, change and delete flatpages 
     
    8585`Django database API`_. 
    8686 
    87 .. _Django model: http://www.djangoproject.com/documentation/model_api/ 
     87.. _Django model: ../model_api/ 
    8888.. _django/contrib/flatpages/models.py: http://code.djangoproject.com/browser/django/trunk/django/contrib/flatpages/models.py 
    89 .. _Django database API: http://www.djangoproject.com/documentation/db_api/ 
     89.. _Django database API: ../db_api/ 
    9090 
    9191Flatpage templates 
  • django/branches/sqlalchemy/docs/forms.txt

    r4054 r4455  
    33=============================== 
    44 
     5Forwards-compatibility note 
     6=========================== 
     7 
     8The legacy forms/manipulators system described in this document is going to be 
     9replaced in the next Django release. If you're starting from scratch, we 
     10strongly encourage you not to waste your time learning this. Instead, learn and 
     11use the django.newforms system, which we have begun to document in the 
     12`newforms documentation`_. 
     13 
     14If you have legacy form/manipulator code, read the "Migration plan" section in 
     15that document to understand how we're making the switch. 
     16 
     17.. _newforms documentation: ../newforms/ 
     18 
     19Introduction 
     20============ 
     21 
    522Once you've got a chance to play with Django's admin interface, you'll probably 
    623wonder if the fantastic form validation framework it uses is available to user 
    724code. It is, and this document explains how the framework works. 
    8  
    9     .. admonition:: A note to the lazy 
    10  
    11         If all you want to do is present forms for a user to create and/or 
    12         update a given object, you may be able to use `generic views`_. 
    1325 
    1426We'll take a top-down approach to examining Django's form validation framework, 
     
    4254but what if you want to allow public users to submit places? 
    4355 
    44 Manipulators 
    45 ============ 
     56Automatic Manipulators 
     57====================== 
    4658 
    4759The highest-level interface for object creation and modification is the 
    48 **Manipulator** framework. A manipulator is a utility class tied to a given 
    49 model that "knows" how to create or modify instances of that model and how to 
    50 validate data for the object. Manipulators come in two flavors: 
    51 ``AddManipulators`` and ``ChangeManipulators``. Functionally they are quite 
    52 similar, but the former knows how to create new instances of the model, whil
    53 the latter modifies existing instances. Both types of classes are automatically 
    54 created when you define a new class:: 
     60**automatic Manipulator** framework. An automatic manipulator is a utility 
     61class tied to a given model that "knows" how to create or modify instances of 
     62that model and how to validate data for the object. Automatic Manipulators come 
     63in two flavors: ``AddManipulators`` and ``ChangeManipulators``. Functionally 
     64they are quite similar, but the former knows how to create new instances of th
     65model, while the latter modifies existing instances. Both types of classes are 
     66automatically created when you define a new class:: 
    5567 
    5668    >>> from mysite.myapp.models import Place 
     
    654666    document for more details). 
    655667 
    656 .. _`generic views`: http://www.djangoproject.com/documentation/generic_views/ 
    657 .. _`models API`: http://www.djangoproject.com/documentation/model_api/ 
    658 .. _settings: http://www.djangoproject.com/documentation/settings/ 
     668.. _`generic views`: ../generic_views/ 
     669.. _`models API`: ../model_api/ 
     670.. _settings: ../settings/ 
  • django/branches/sqlalchemy/docs/generic_views.txt

    <
    r4054 r4455  
    7272lambda that returns the QuerySet. 
    7373 
    74 .. _database API docs: http://www.djangoproject.com/documentation/db_api/ 
     74.. _database API docs: ../db_api/ 
    7575 
    7676"Simple" generic views 
     
    100100      just before rendering the template. (**This is new in the 
    101101      Django development version.**) 
    102        
     102 
    103103**Example:** 
    104104