Fixed #3333 -- Docs now use relative links, not hard-coded djangoproject.com links. Thanks for the patch, SmileyChris
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4420 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
788f8f7454
commit
8e54c49784
|
@ -17,7 +17,7 @@ admin
|
|||
The automatic Django administrative interface. For more information, see
|
||||
`Tutorial 2`_.
|
||||
|
||||
.. _Tutorial 2: http://www.djangoproject.com/documentation/tutorial2/
|
||||
.. _Tutorial 2: ../tutorial2/
|
||||
|
||||
auth
|
||||
====
|
||||
|
@ -26,7 +26,7 @@ Django's authentication framework.
|
|||
|
||||
See the `authentication documentation`_.
|
||||
|
||||
.. _authentication documentation: http://www.djangoproject.com/documentation/authentication/
|
||||
.. _authentication documentation: ../authentication/
|
||||
|
||||
comments
|
||||
========
|
||||
|
@ -46,7 +46,7 @@ A middleware for preventing Cross Site Request Forgeries
|
|||
|
||||
See the `csrf documentation`_.
|
||||
|
||||
.. _csrf documentation: http://www.djangoproject.com/documentation/csrf/
|
||||
.. _csrf documentation: ../csrf/
|
||||
|
||||
formtools
|
||||
=========
|
||||
|
@ -137,7 +137,7 @@ A framework for managing simple "flat" HTML content in a database.
|
|||
|
||||
See the `flatpages documentation`_.
|
||||
|
||||
.. _flatpages documentation: http://www.djangoproject.com/documentation/flatpages/
|
||||
.. _flatpages documentation: ../flatpages/
|
||||
|
||||
markup
|
||||
======
|
||||
|
@ -157,7 +157,7 @@ A framework for managing redirects.
|
|||
|
||||
See the `redirects documentation`_.
|
||||
|
||||
.. _redirects documentation: http://www.djangoproject.com/documentation/redirects/
|
||||
.. _redirects documentation: ../redirects/
|
||||
|
||||
sites
|
||||
=====
|
||||
|
@ -168,7 +168,7 @@ one or more sites.
|
|||
|
||||
See the `sites documentation`_.
|
||||
|
||||
.. _sites documentation: http://www.djangoproject.com/documentation/sites/
|
||||
.. _sites documentation: ../sites/
|
||||
|
||||
sitemaps
|
||||
========
|
||||
|
@ -177,7 +177,7 @@ A framework for generating Google sitemap XML files.
|
|||
|
||||
See the `sitemaps documentation`_.
|
||||
|
||||
.. _sitemaps documentation: http://www.djangoproject.com/documentation/sitemaps/
|
||||
.. _sitemaps documentation: ../sitemaps/
|
||||
|
||||
syndication
|
||||
===========
|
||||
|
@ -186,7 +186,7 @@ A framework for generating syndication feeds, in RSS and Atom, quite easily.
|
|||
|
||||
See the `syndication documentation`_.
|
||||
|
||||
.. _syndication documentation: http://www.djangoproject.com/documentation/syndication/
|
||||
.. _syndication documentation: ../syndication/
|
||||
|
||||
Other add-ons
|
||||
=============
|
||||
|
|
|
@ -65,7 +65,7 @@ are equivalent::
|
|||
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
|
||||
PythonOption DJANGO_SETTINGS_MODULE mysite.settings
|
||||
|
||||
.. _authentication system: http://www.djangoproject.com/documentation/authentication/
|
||||
.. _authentication system: ../authentication/
|
||||
.. _Subversion: http://subversion.tigris.org/
|
||||
.. _mod_dav: http://httpd.apache.org/docs/2.0/mod/mod_dav.html
|
||||
.. _custom permissions: http://www.djangoproject.com/documentation/authentication/#custom-permissions
|
||||
.. _custom permissions: ../authentication/#custom-permissions
|
||||
|
|
|
@ -98,26 +98,26 @@ change:
|
|||
rewrite before Django 1.0. Even if the change isn't quite that drastic,
|
||||
there will at least be moderate changes.
|
||||
|
||||
.. _caching: http://www.djangoproject.com/documentation/cache/
|
||||
.. _custom template tags and libraries: http://www.djangoproject.com/documentation/templates_python/
|
||||
.. _database lookup: http://www.djangoproject.com/documentation/db_api/
|
||||
.. _django-admin utility: http://www.djangoproject.com/documentation/django_admin/
|
||||
.. _fastcgi integration: http://www.djangoproject.com/documentation/fastcgi/
|
||||
.. _flatpages: http://www.djangoproject.com/documentation/flatpages/
|
||||
.. _generic views: http://www.djangoproject.com/documentation/generic_views/
|
||||
.. _internationalization: http://www.djangoproject.com/documentation/i18n/
|
||||
.. _legacy database integration: http://www.djangoproject.com/documentation/legacy_databases/
|
||||
.. _model definition: http://www.djangoproject.com/documentation/model_api/
|
||||
.. _mod_python integration: http://www.djangoproject.com/documentation/modpython/
|
||||
.. _redirects: http://www.djangoproject.com/documentation/redirects/
|
||||
.. _request/response objects: http://www.djangoproject.com/documentation/request_response/
|
||||
.. _sending email: http://www.djangoproject.com/documentation/email/
|
||||
.. _sessions: http://www.djangoproject.com/documentation/sessions/
|
||||
.. _settings: http://www.djangoproject.com/documentation/settings/
|
||||
.. _syndication: http://www.djangoproject.com/documentation/syndication/
|
||||
.. _template language: http://www.djangoproject.com/documentation/templates/
|
||||
.. _transactions: http://www.djangoproject.com/documentation/transactions/
|
||||
.. _url dispatch: http://www.djangoproject.com/documentation/url_dispatch/
|
||||
.. _forms and validation: http://www.djangoproject.com/documentation/forms/
|
||||
.. _serialization: http://www.djangoproject.com/documentation/serialization/
|
||||
.. _authentication: http://www.djangoproject.com/documentation/authentication/
|
||||
.. _caching: ../cache/
|
||||
.. _custom template tags and libraries: ../templates_python/
|
||||
.. _database lookup: ../db_api/
|
||||
.. _django-admin utility: ../django_admin/
|
||||
.. _fastcgi integration: ../fastcgi/
|
||||
.. _flatpages: ../flatpages/
|
||||
.. _generic views: ../generic_views/
|
||||
.. _internationalization: ../i18n/
|
||||
.. _legacy database integration: ../legacy_databases/
|
||||
.. _model definition: ../model_api/
|
||||
.. _mod_python integration: ../modpython/
|
||||
.. _redirects: ../redirects/
|
||||
.. _request/response objects: ../request_response/
|
||||
.. _sending email: ../email/
|
||||
.. _sessions: ../sessions/
|
||||
.. _settings: ../settings/
|
||||
.. _syndication: ../syndication/
|
||||
.. _template language: ../templates/
|
||||
.. _transactions: ../transactions/
|
||||
.. _url dispatch: ../url_dispatch/
|
||||
.. _forms and validation: ../forms/
|
||||
.. _serialization: ../serialization/
|
||||
.. _authentication: ../authentication/
|
||||
|
|
|
@ -144,8 +144,8 @@ custom methods:
|
|||
Raises ``django.contrib.auth.models.SiteProfileNotAvailable`` if the current site
|
||||
doesn't allow profiles.
|
||||
|
||||
.. _Django model: http://www.djangoproject.com/documentation/model_api/
|
||||
.. _DEFAULT_FROM_EMAIL: http://www.djangoproject.com/documentation/settings/#default-from-email
|
||||
.. _Django model: ../model_api/
|
||||
.. _DEFAULT_FROM_EMAIL: ../settings/#default-from-email
|
||||
|
||||
Manager functions
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
@ -271,8 +271,8 @@ previous section). You can tell them apart with ``is_authenticated()``, like so:
|
|||
else:
|
||||
# Do something for anonymous users.
|
||||
|
||||
.. _request objects: http://www.djangoproject.com/documentation/request_response/#httprequest-objects
|
||||
.. _session documentation: http://www.djangoproject.com/documentation/sessions/
|
||||
.. _request objects: ../request_response/#httprequest-objects
|
||||
.. _session documentation: ../sessions/
|
||||
|
||||
How to log a user in
|
||||
--------------------
|
||||
|
@ -441,8 +441,8 @@ block::
|
|||
|
||||
{% endblock %}
|
||||
|
||||
.. _forms documentation: http://www.djangoproject.com/documentation/forms/
|
||||
.. _site framework docs: http://www.djangoproject.com/documentation/sites/
|
||||
.. _forms documentation: ../forms/
|
||||
.. _site framework docs: ../sites/
|
||||
|
||||
Limiting access to logged-in users that pass a test
|
||||
---------------------------------------------------
|
||||
|
@ -544,7 +544,7 @@ For example::
|
|||
def limited_object_detail(*args, **kwargs):
|
||||
return object_detail(*args, **kwargs)
|
||||
|
||||
.. _generic view: http://www.djangoproject.com/documentation/generic_views/
|
||||
.. _generic view: ../generic_views/
|
||||
|
||||
Permissions
|
||||
===========
|
||||
|
@ -606,7 +606,7 @@ This example model creates three custom permissions::
|
|||
The only thing this does is create those extra permissions when you run
|
||||
``syncdb``.
|
||||
|
||||
.. _model Meta attribute: http://www.djangoproject.com/documentation/model_api/#meta-options
|
||||
.. _model Meta attribute: ../model_api/#meta-options
|
||||
|
||||
API reference
|
||||
-------------
|
||||
|
@ -645,7 +645,7 @@ The currently logged-in user and his/her permissions are made available in the
|
|||
setting contains ``"django.core.context_processors.auth"``, which is default.
|
||||
For more, see the `RequestContext docs`_.
|
||||
|
||||
.. _RequestContext docs: http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext
|
||||
.. _RequestContext docs: ../templates_python/#subclassing-context-requestcontext
|
||||
|
||||
Users
|
||||
-----
|
||||
|
@ -691,7 +691,7 @@ Thus, you can check permissions in template ``{% if %}`` statements::
|
|||
<p>You don't have permission to do anything in the foo app.</p>
|
||||
{% endif %}
|
||||
|
||||
.. _template context: http://www.djangoproject.com/documentation/templates_python/
|
||||
.. _template context: ../templates_python/
|
||||
|
||||
Groups
|
||||
======
|
||||
|
@ -756,7 +756,7 @@ scenes, so any messages will be deleted even if you don't display them.
|
|||
Finally, note that this messages framework only works with users in the user
|
||||
database. To send messages to anonymous users, use the `session framework`_.
|
||||
|
||||
.. _session framework: http://www.djangoproject.com/documentation/sessions/
|
||||
.. _session framework: ../sessions/
|
||||
|
||||
Other authentication sources
|
||||
============================
|
||||
|
|
|
@ -250,7 +250,7 @@ Additionally, ``CacheMiddleware`` automatically sets a few headers in each
|
|||
|
||||
See the `middleware documentation`_ for more on middleware.
|
||||
|
||||
.. _`middleware documentation`: http://www.djangoproject.com/documentation/middleware/
|
||||
.. _`middleware documentation`: ../middleware/
|
||||
|
||||
The per-view cache
|
||||
==================
|
||||
|
|
|
@ -232,7 +232,7 @@ translated, here's what to do:
|
|||
`i18n documentation`_.
|
||||
|
||||
.. _Django i18n mailing list: http://groups.google.com/group/django-i18n/
|
||||
.. _i18n documentation: http://www.djangoproject.com/documentation/i18n/
|
||||
.. _i18n documentation: ../i18n/
|
||||
|
||||
Coding style
|
||||
============
|
||||
|
@ -357,7 +357,7 @@ The Django tests all use the testing infrastructure that ships with Django for
|
|||
testing applications. See `Testing Django applications`_ for an explanation of
|
||||
how to write new tests.
|
||||
|
||||
.. _Testing Django applications: http://www.djangoproject.com/documentation/testing/
|
||||
.. _Testing Django applications: ../testing/
|
||||
|
||||
Running the unit tests
|
||||
----------------------
|
||||
|
|
|
@ -186,7 +186,7 @@ code.
|
|||
|
||||
This is the philosophy behind `template inheritance`_.
|
||||
|
||||
.. _template inheritance: http://www.djangoproject.com/documentation/templates/#template-inheritance
|
||||
.. _template inheritance: ./templates/#template-inheritance
|
||||
|
||||
Be decoupled from HTML
|
||||
----------------------
|
||||
|
|
|
@ -53,7 +53,7 @@ Prints the admin-index template snippet for the given appnames.
|
|||
Use admin-index template snippets if you want to customize the look and feel of
|
||||
your admin's index page. See `Tutorial 2`_ for more information.
|
||||
|
||||
.. _Tutorial 2: http://www.djangoproject.com/documentation/tutorial2/
|
||||
.. _Tutorial 2: ../tutorial2/
|
||||
|
||||
createcachetable [tablename]
|
||||
----------------------------
|
||||
|
@ -61,7 +61,7 @@ createcachetable [tablename]
|
|||
Creates a cache table named ``tablename`` for use with the database cache
|
||||
backend. See the `cache documentation`_ for more information.
|
||||
|
||||
.. _cache documentation: http://www.djangoproject.com/documentation/cache/
|
||||
.. _cache documentation: ../cache/
|
||||
|
||||
dbshell
|
||||
-------
|
||||
|
@ -190,7 +190,7 @@ By default, the development server doesn't serve any static files for your site
|
|||
you want to configure Django to serve static media, read the `serving static files`_
|
||||
documentation.
|
||||
|
||||
.. _serving static files: http://www.djangoproject.com/documentation/static_files/
|
||||
.. _serving static files: ../static_files/
|
||||
|
||||
Turning off auto-reload
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
|
@ -101,9 +101,9 @@ The "From:" header of the e-mail will be the value of the `SERVER_EMAIL setting`
|
|||
|
||||
This method exists for convenience and readability.
|
||||
|
||||
.. _ADMINS setting: http://www.djangoproject.com/documentation/settings/#admins
|
||||
.. _EMAIL_SUBJECT_PREFIX setting: http://www.djangoproject.com/documentation/settings/#email-subject-prefix
|
||||
.. _SERVER_EMAIL setting: http://www.djangoproject.com/documentation/settings/#server-email
|
||||
.. _ADMINS setting: ../settings/#admins
|
||||
.. _EMAIL_SUBJECT_PREFIX setting: ../settings/#email-subject-prefix
|
||||
.. _SERVER_EMAIL setting: ../settings/#server-email
|
||||
|
||||
mail_managers() function
|
||||
========================
|
||||
|
@ -114,7 +114,7 @@ Here's the definition::
|
|||
|
||||
mail_managers(subject, message, fail_silently=False)
|
||||
|
||||
.. _MANAGERS setting: http://www.djangoproject.com/documentation/settings/#managers
|
||||
.. _MANAGERS setting: ../settings/#managers
|
||||
|
||||
Examples
|
||||
========
|
||||
|
|
24
docs/faq.txt
24
docs/faq.txt
|
@ -63,7 +63,7 @@ at any level -- database servers, caching servers or Web/application servers.
|
|||
The framework cleanly separates components such as its database layer and
|
||||
application layer. And it ships with a simple-yet-powerful `cache framework`_.
|
||||
|
||||
.. _`cache framework`: http://www.djangoproject.com/documentation/cache/
|
||||
.. _`cache framework`: ../cache/
|
||||
|
||||
Who's behind this?
|
||||
------------------
|
||||
|
@ -191,7 +191,7 @@ Like we said: We're picky.
|
|||
|
||||
We've documented our philosophies on the `design philosophies page`_.
|
||||
|
||||
.. _design philosophies page: http://www.djangoproject.com/documentation/design_philosophies/
|
||||
.. _design philosophies page: ../design_philosophies/
|
||||
|
||||
Do you have any of those nifty "screencast" things?
|
||||
---------------------------------------------------
|
||||
|
@ -277,9 +277,9 @@ How do I get started?
|
|||
run into trouble.
|
||||
|
||||
.. _`Download the code`: http://www.djangoproject.com/download/
|
||||
.. _`installation guide`: http://www.djangoproject.com/documentation/install/
|
||||
.. _tutorial: http://www.djangoproject.com/documentation/tutorial1/
|
||||
.. _documentation: http://www.djangoproject.com/documentation/
|
||||
.. _`installation guide`: ../install/
|
||||
.. _tutorial: ../tutorial1/
|
||||
.. _documentation: ../
|
||||
.. _ask questions: http://www.djangoproject.com/community/
|
||||
|
||||
How do I fix the "install a later version of setuptools" error?
|
||||
|
@ -337,7 +337,7 @@ If you just want to play around and develop things on your local computer, use
|
|||
the development Web server that comes with Django. Things should Just Work.
|
||||
|
||||
.. _WSGI: http://www.python.org/peps/pep-0333.html
|
||||
.. _How to use Django with FastCGI: http://www.djangoproject.com/documentation/fastcgi/
|
||||
.. _How to use Django with FastCGI: ../fastcgi/
|
||||
.. _server arrangements wiki page: http://code.djangoproject.com/wiki/ServerArrangements
|
||||
|
||||
How do I install mod_python on Windows?
|
||||
|
@ -464,7 +464,7 @@ Can I use Django with a pre-existing database?
|
|||
|
||||
Yes. See `Integrating with a legacy database`_.
|
||||
|
||||
.. _`Integrating with a legacy database`: http://www.djangoproject.com/documentation/legacy_databases/
|
||||
.. _`Integrating with a legacy database`: ../legacy_databases/
|
||||
|
||||
If I make changes to a model, how do I update the database?
|
||||
-----------------------------------------------------------
|
||||
|
@ -511,7 +511,7 @@ type, create an initial data file and put something like this in it::
|
|||
As explained in the `SQL initial data file`_ documentation, this SQL file can
|
||||
contain arbitrary SQL, so you can make any sorts of changes you need to make.
|
||||
|
||||
.. _SQL initial data file: http://www.djangoproject.com/documentation/model_api/#providing-initial-sql-data
|
||||
.. _SQL initial data file: ../model_api/#providing-initial-sql-data
|
||||
|
||||
Why is Django leaking memory?
|
||||
-----------------------------
|
||||
|
@ -592,7 +592,7 @@ My admin-site CSS and images showed up fine using the development server, but th
|
|||
See `serving the admin files`_ in the "How to use Django with mod_python"
|
||||
documentation.
|
||||
|
||||
.. _serving the admin files: http://www.djangoproject.com/documentation/modpython/#serving-the-admin-files
|
||||
.. _serving the admin files: ../modpython/#serving-the-admin-files
|
||||
|
||||
My "list_filter" contains a ManyToManyField, but the filter doesn't display.
|
||||
----------------------------------------------------------------------------
|
||||
|
@ -630,7 +630,7 @@ site is built using semantic HTML and plenty of CSS hooks, so any changes you'd
|
|||
like to make should be possible by editing the stylesheet. We've got a
|
||||
`guide to the CSS used in the admin`_ to get you started.
|
||||
|
||||
.. _`guide to the CSS used in the admin`: http://www.djangoproject.com/documentation/admin_css/
|
||||
.. _`guide to the CSS used in the admin`: ../admin_css/
|
||||
|
||||
How do I create users without having to edit password hashes?
|
||||
-------------------------------------------------------------
|
||||
|
@ -640,7 +640,7 @@ development version, where this problem was fixed on Aug. 4, 2006.
|
|||
|
||||
You can also use the Python API. See `creating users`_ for full info.
|
||||
|
||||
.. _creating users: http://www.djangoproject.com/documentation/authentication/#creating-users
|
||||
.. _creating users: ../authentication/#creating-users
|
||||
|
||||
Contributing code
|
||||
=================
|
||||
|
@ -651,7 +651,7 @@ How can I get started contributing code to Django?
|
|||
Thanks for asking! We've written an entire document devoted to this question.
|
||||
It's titled `Contributing to Django`_.
|
||||
|
||||
.. _Contributing to Django: http://www.djangoproject.com/documentation/contributing/
|
||||
.. _Contributing to Django: ../contributing/
|
||||
|
||||
I submitted a bug fix in the ticket system several weeks ago. Why are you ignoring my patch?
|
||||
--------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -17,7 +17,7 @@ served with no startup time. Unlike mod_python (or `mod_perl`_), a FastCGI
|
|||
process doesn't run inside the Web server process, but in a separate,
|
||||
persistent process.
|
||||
|
||||
.. _current preferred setup: http://www.djangoproject.com/documentation/modpython/
|
||||
.. _current preferred setup: ../modpython/
|
||||
.. _Apache: http://httpd.apache.org/
|
||||
.. _mod_python: http://www.modpython.org/
|
||||
.. _mod_perl: http://perl.apache.org/
|
||||
|
|
|
@ -29,8 +29,8 @@ To install the flatpages app, follow these steps:
|
|||
to your MIDDLEWARE_CLASSES_ setting.
|
||||
3. Run the command ``manage.py syncdb``.
|
||||
|
||||
.. _INSTALLED_APPS: http://www.djangoproject.com/documentation/settings/#installed-apps
|
||||
.. _MIDDLEWARE_CLASSES: http://www.djangoproject.com/documentation/settings/#middleware-classes
|
||||
.. _INSTALLED_APPS: ../settings/#installed-apps
|
||||
.. _MIDDLEWARE_CLASSES: ../settings/#middleware-classes
|
||||
|
||||
How it works
|
||||
============
|
||||
|
@ -63,9 +63,9 @@ resort.
|
|||
|
||||
For more on middleware, read the `middleware docs`_.
|
||||
|
||||
.. _SITE_ID: http://www.djangoproject.com/documentation/settings/#site-id
|
||||
.. _RequestContext: http://www.djangoproject.com/documentation/templates_python/#subclassing-context-djangocontext
|
||||
.. _middleware docs: http://www.djangoproject.com/documentation/middleware/
|
||||
.. _SITE_ID: ../settings/#site-id
|
||||
.. _RequestContext: ../templates_python/#subclassing-context-djangocontext
|
||||
.. _middleware docs: ../middleware/
|
||||
|
||||
How to add, change and delete flatpages
|
||||
=======================================
|
||||
|
@ -84,9 +84,9 @@ Flatpages are represented by a standard `Django model`_, which lives in
|
|||
`django/contrib/flatpages/models.py`_. You can access flatpage objects via the
|
||||
`Django database API`_.
|
||||
|
||||
.. _Django model: http://www.djangoproject.com/documentation/model_api/
|
||||
.. _Django model: ../model_api/
|
||||
.. _django/contrib/flatpages/models.py: http://code.djangoproject.com/browser/django/trunk/django/contrib/flatpages/models.py
|
||||
.. _Django database API: http://www.djangoproject.com/documentation/db_api/
|
||||
.. _Django database API: ../db_api/
|
||||
|
||||
Flatpage templates
|
||||
==================
|
||||
|
|
|
@ -14,7 +14,7 @@ use the django.newforms system, which we have begun to document in the
|
|||
If you have legacy form/manipulator code, read the "Migration plan" section in
|
||||
that document to understand how we're making the switch.
|
||||
|
||||
.. _newforms documentation: http://www.djangoproject.com/documentation/newforms/
|
||||
.. _newforms documentation: ../newforms/
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
@ -665,6 +665,6 @@ fails. If no message is passed in, a default message is used.
|
|||
the executable specified in the ``JING_PATH`` setting (see the settings_
|
||||
document for more details).
|
||||
|
||||
.. _`generic views`: http://www.djangoproject.com/documentation/generic_views/
|
||||
.. _`models API`: http://www.djangoproject.com/documentation/model_api/
|
||||
.. _settings: http://www.djangoproject.com/documentation/settings/
|
||||
.. _`generic views`: ../generic_views/
|
||||
.. _`models API`: ../model_api/
|
||||
.. _settings: ../settings/
|
||||
|
|
|
@ -71,7 +71,7 @@ are first evaluated, so if you want to pass in a QuerySet via
|
|||
``extra_context`` that is always fresh you need to wrap it in a function or
|
||||
lambda that returns the QuerySet.
|
||||
|
||||
.. _database API docs: http://www.djangoproject.com/documentation/db_api/
|
||||
.. _database API docs: ../db_api/
|
||||
|
||||
"Simple" generic views
|
||||
======================
|
||||
|
@ -223,7 +223,7 @@ In addition to ``extra_context``, the template's context will be:
|
|||
by ``date_field``. For example, if ``num_latest`` is ``10``, then
|
||||
``latest`` will be a list of the latest 10 objects in ``queryset``.
|
||||
|
||||
.. _RequestContext docs: http://www.djangoproject.com/documentation/templates_python/#subclassing-context-djangocontext
|
||||
.. _RequestContext docs: ../templates_python/#subclassing-context-djangocontext
|
||||
|
||||
``django.views.generic.date_based.archive_year``
|
||||
------------------------------------------------
|
||||
|
@ -916,8 +916,8 @@ In addition to ``extra_context``, the template's context will be:
|
|||
See the `manipulator and formfield documentation`_ for more information
|
||||
about using ``FormWrapper`` objects in templates.
|
||||
|
||||
.. _authentication system: http://www.djangoproject.com/documentation/authentication/
|
||||
.. _manipulator and formfield documentation: http://www.djangoproject.com/documentation/forms/
|
||||
.. _authentication system: ../authentication/
|
||||
.. _manipulator and formfield documentation: ../forms/
|
||||
|
||||
``django.views.generic.create_update.update_object``
|
||||
----------------------------------------------------
|
||||
|
|
|
@ -53,7 +53,7 @@ internationalization machinery. See the `documentation for USE_I18N`_.
|
|||
You'll probably also want to remove ``'django.core.context_processors.i18n'``
|
||||
from your ``TEMPLATE_CONTEXT_PROCESSORS`` setting.
|
||||
|
||||
.. _documentation for USE_I18N: http://www.djangoproject.com/documentation/settings/#use-i18n
|
||||
.. _documentation for USE_I18N: ../settings/#use-i18n
|
||||
|
||||
How to specify translation strings
|
||||
==================================
|
||||
|
@ -175,7 +175,7 @@ class, though::
|
|||
verbose_name = _('my thing')
|
||||
verbose_name_plural = _('mythings')
|
||||
|
||||
.. _Django models: http://www.djangoproject.com/documentation/model_api/
|
||||
.. _Django models: ../model_api/
|
||||
|
||||
Pluralization
|
||||
~~~~~~~~~~~~~
|
||||
|
@ -274,7 +274,7 @@ translation string. Example::
|
|||
In this case, both the tag and the filter will see the already-translated
|
||||
string, so they don't need to be aware of translations.
|
||||
|
||||
.. _Django templates: http://www.djangoproject.com/documentation/templates_python/
|
||||
.. _Django templates: ../templates_python/
|
||||
|
||||
How to create language files
|
||||
============================
|
||||
|
@ -394,7 +394,7 @@ That's it. Your translations are ready for use.
|
|||
please let us know! See `Submitting and maintaining translations`_ for
|
||||
the steps to take.
|
||||
|
||||
.. _Submitting and maintaining translations: http://www.djangoproject.com/documentation/contributing/
|
||||
.. _Submitting and maintaining translations: ../contributing/
|
||||
|
||||
How Django discovers language preference
|
||||
========================================
|
||||
|
@ -472,7 +472,7 @@ Notes:
|
|||
selection to German and English (and any sublanguage, like de-ch or
|
||||
en-us).
|
||||
|
||||
.. _LANGUAGES setting: http://www.djangoproject.com/documentation/settings/#languages
|
||||
.. _LANGUAGES setting: ../settings/#languages
|
||||
|
||||
* If you define a custom ``LANGUAGES`` setting, as explained in the
|
||||
previous bullet, it's OK to mark the languages as translation strings
|
||||
|
@ -530,10 +530,10 @@ Note that, with static (middleware-less) translation, the language is in
|
|||
``settings.LANGUAGE_CODE``, while with dynamic (middleware) translation, it's
|
||||
in ``request.LANGUAGE_CODE``.
|
||||
|
||||
.. _settings file: http://www.djangoproject.com/documentation/settings/
|
||||
.. _middleware documentation: http://www.djangoproject.com/documentation/middleware/
|
||||
.. _session: http://www.djangoproject.com/documentation/sessions/
|
||||
.. _request object: http://www.djangoproject.com/documentation/request_response/#httprequest-objects
|
||||
.. _settings file: ../settings/
|
||||
.. _middleware documentation: ../middleware/
|
||||
.. _session: ../sessions/
|
||||
.. _request object: ../request_response/#httprequest-objects
|
||||
|
||||
The ``set_language`` redirect view
|
||||
==================================
|
||||
|
@ -599,7 +599,7 @@ message file. The choice is yours.
|
|||
of the settings file to determine this, and a settings file doesn't exist
|
||||
if you're manually configuring your settings.)
|
||||
|
||||
.. _settings documentation: http://www.djangoproject.com/documentation/settings/#using-settings-without-the-django-settings-module-environment-variable
|
||||
.. _settings documentation: ../settings/#using-settings-without-the-django-settings-module-environment-variable
|
||||
|
||||
All message file repositories are structured the same way. They are:
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ each platform.
|
|||
.. _Apache: http://httpd.apache.org/
|
||||
.. _mod_python: http://www.modpython.org/
|
||||
.. _WSGI: http://www.python.org/peps/pep-0333.html
|
||||
.. _How to use Django with mod_python: http://www.djangoproject.com/documentation/modpython/
|
||||
.. _How to use Django with mod_python: ../modpython/
|
||||
.. _server-arrangements wiki page: http://code.djangoproject.com/wiki/ServerArrangements
|
||||
|
||||
Get your database running
|
||||
|
|
|
@ -9,7 +9,7 @@ utilities to automate as much of this process as possible.
|
|||
This document assumes you know the Django basics, as covered in the
|
||||
`official tutorial`_.
|
||||
|
||||
.. _official tutorial: http://www.djangoproject.com/documentation/tutorial1/
|
||||
.. _official tutorial: ../tutorial1/
|
||||
|
||||
Give Django your database parameters
|
||||
====================================
|
||||
|
@ -25,13 +25,13 @@ what the name of the database is. Do that by editing these settings in your
|
|||
* `DATABASE_HOST`_
|
||||
* `DATABASE_PORT`_
|
||||
|
||||
.. _settings file: http://www.djangoproject.com/documentation/settings/
|
||||
.. _DATABASE_NAME: http://www.djangoproject.com/documentation/settings/#database-name
|
||||
.. _DATABASE_ENGINE: http://www.djangoproject.com/documentation/settings/#database-engine
|
||||
.. _DATABASE_USER: http://www.djangoproject.com/documentation/settings/#database-user
|
||||
.. _DATABASE_PASSWORD: http://www.djangoproject.com/documentation/settings/#database-password
|
||||
.. _DATABASE_HOST: http://www.djangoproject.com/documentation/settings/#database-host
|
||||
.. _DATABASE_PORT: http://www.djangoproject.com/documentation/settings/#database-port
|
||||
.. _settings file: ../settings/
|
||||
.. _DATABASE_NAME: ../settings/#database-name
|
||||
.. _DATABASE_ENGINE: ../settings/#database-engine
|
||||
.. _DATABASE_USER: ../settings/#database-user
|
||||
.. _DATABASE_PASSWORD: ../settings/#database-password
|
||||
.. _DATABASE_HOST: ../settings/#database-host
|
||||
.. _DATABASE_PORT: ../settings/#database-port
|
||||
|
||||
Auto-generate the models
|
||||
========================
|
||||
|
@ -52,7 +52,7 @@ Once you've cleaned up your models, name the file ``models.py`` and put it in
|
|||
the Python package that holds your app. Then add the app to your
|
||||
``INSTALLED_APPS`` setting.
|
||||
|
||||
.. _django-admin.py documentation: http://www.djangoproject.com/documentation/django_admin/
|
||||
.. _django-admin.py documentation: ../django_admin/
|
||||
|
||||
Install the core Django tables
|
||||
==============================
|
||||
|
|
|
@ -47,7 +47,7 @@ Enables site-wide cache. If this is enabled, each Django-powered page will be
|
|||
cached for as long as the ``CACHE_MIDDLEWARE_SECONDS`` setting defines. See
|
||||
the `cache documentation`_.
|
||||
|
||||
.. _`cache documentation`: http://www.djangoproject.com/documentation/cache/#the-per-site-cache
|
||||
.. _`cache documentation`: ../cache/#the-per-site-cache
|
||||
|
||||
django.middleware.common.CommonMiddleware
|
||||
-----------------------------------------
|
||||
|
@ -123,7 +123,7 @@ django.contrib.sessions.middleware.SessionMiddleware
|
|||
|
||||
Enables session support. See the `session documentation`_.
|
||||
|
||||
.. _`session documentation`: http://www.djangoproject.com/documentation/sessions/
|
||||
.. _`session documentation`: ../sessions/
|
||||
|
||||
django.contrib.auth.middleware.AuthenticationMiddleware
|
||||
-------------------------------------------------------
|
||||
|
@ -131,7 +131,7 @@ django.contrib.auth.middleware.AuthenticationMiddleware
|
|||
Adds the ``user`` attribute, representing the currently-logged-in user, to
|
||||
every incoming ``HttpRequest`` object. See `Authentication in Web requests`_.
|
||||
|
||||
.. _Authentication in Web requests: http://www.djangoproject.com/documentation/authentication/#authentication-in-web-requests
|
||||
.. _Authentication in Web requests: ../authentication/#authentication-in-web-requests
|
||||
|
||||
django.middleware.transaction.TransactionMiddleware
|
||||
---------------------------------------------------
|
||||
|
@ -147,7 +147,7 @@ the same transaction control as the view functions.
|
|||
|
||||
See the `transaction management documentation`_.
|
||||
|
||||
.. _`transaction management documentation`: http://www.djangoproject.com/documentation/transactions/
|
||||
.. _`transaction management documentation`: ../transactions/
|
||||
|
||||
Writing your own middleware
|
||||
===========================
|
||||
|
|
|
@ -20,7 +20,7 @@ You may also be interested in `How to use Django with FastCGI`_.
|
|||
.. _mod_perl: http://perl.apache.org/
|
||||
.. _prefork MPM: http://httpd.apache.org/docs/2.2/mod/prefork.html
|
||||
.. _worker MPM: http://httpd.apache.org/docs/2.2/mod/worker.html
|
||||
.. _How to use Django with FastCGI: http://www.djangoproject.com/documentation/fastcgi/
|
||||
.. _How to use Django with FastCGI: ../fastcgi/
|
||||
|
||||
Basic configuration
|
||||
===================
|
||||
|
|
|
@ -24,7 +24,7 @@ and Django's ``HttpResponse`` objects are file-like objects.
|
|||
|
||||
For more information on the CSV library, see the `CSV library docs`_.
|
||||
|
||||
.. _Request and response objects: http://www.djangoproject.com/documentation/request_response/
|
||||
.. _Request and response objects: ../request_response/
|
||||
.. _CSV library docs: http://www.python.org/doc/current/lib/module-csv.html
|
||||
|
||||
Here's an example::
|
||||
|
@ -115,5 +115,5 @@ a line of CSV for each row. It uses the `addslashes template filter`_ to ensure
|
|||
there aren't any problems with quotes. If you can be certain your data doesn't
|
||||
have single or double quotes in it, you can remove the ``addslashes`` filters.
|
||||
|
||||
.. _Django template system: http://www.djangoproject.com/documentation/templates/
|
||||
.. _addslashes template filter: http://www.djangoproject.com/documentation/templates/#addslashes
|
||||
.. _Django template system: ../templates/
|
||||
.. _addslashes template filter: ../templates/#addslashes
|
||||
|
|
|
@ -43,7 +43,7 @@ objects.
|
|||
For more information on ``HttpResponse`` objects, see
|
||||
`Request and response objects`_.
|
||||
|
||||
.. _Request and response objects: http://www.djangoproject.com/documentation/request_response/
|
||||
.. _Request and response objects: ../request_response/
|
||||
|
||||
Here's a "Hello World" example::
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ understand how Django works, but this isn't intended to be a tutorial or
|
|||
reference. Please see our more-detailed Django documentation_ when you're ready
|
||||
to start a project.
|
||||
|
||||
.. _documentation: http://www.djangoproject.com/documentation/
|
||||
.. _documentation: ../
|
||||
|
||||
Design your model
|
||||
=================
|
||||
|
|
|
@ -15,8 +15,8 @@ To install the redirects app, follow these steps:
|
|||
to your MIDDLEWARE_CLASSES_ setting.
|
||||
3. Run the command ``manage.py syncdb``.
|
||||
|
||||
.. _INSTALLED_APPS: http://www.djangoproject.com/documentation/settings/#installed-apps
|
||||
.. _MIDDLEWARE_CLASSES: http://www.djangoproject.com/documentation/settings/#middleware-classes
|
||||
.. _INSTALLED_APPS: ../settings/#installed-apps
|
||||
.. _MIDDLEWARE_CLASSES: ../settings/#middleware-classes
|
||||
|
||||
How it works
|
||||
============
|
||||
|
@ -46,8 +46,8 @@ resort.
|
|||
|
||||
For more on middleware, read the `middleware docs`_.
|
||||
|
||||
.. _SITE_ID: http://www.djangoproject.com/documentation/settings/#site-id
|
||||
.. _middleware docs: http://www.djangoproject.com/documentation/middleware/
|
||||
.. _SITE_ID: ../settings/#site-id
|
||||
.. _middleware docs: ../middleware/
|
||||
|
||||
How to add, change and delete redirects
|
||||
=======================================
|
||||
|
@ -66,6 +66,6 @@ Redirects are represented by a standard `Django model`_, which lives in
|
|||
`django/contrib/redirects/models.py`_. You can access redirect
|
||||
objects via the `Django database API`_.
|
||||
|
||||
.. _Django model: http://www.djangoproject.com/documentation/model_api/
|
||||
.. _Django model: ../model_api/
|
||||
.. _django/contrib/redirects/models.py: http://code.djangoproject.com/browser/django/trunk/django/contrib/redirects/models.py
|
||||
.. _Django database API: http://www.djangoproject.com/documentation/db_api/
|
||||
.. _Django database API: ../db_api/
|
||||
|
|
|
@ -117,14 +117,14 @@ All attributes except ``session`` should be considered read-only.
|
|||
``AuthenticationMiddleware`` activated. For more, see
|
||||
`Authentication in Web requests`_.
|
||||
|
||||
.. _Authentication in Web requests: http://www.djangoproject.com/documentation/authentication/#authentication-in-web-requests
|
||||
.. _Authentication in Web requests: ../authentication/#authentication-in-web-requests
|
||||
|
||||
``session``
|
||||
A readable-and-writable, dictionary-like object that represents the current
|
||||
session. This is only available if your Django installation has session
|
||||
support activated. See the `session documentation`_ for full details.
|
||||
|
||||
.. _`session documentation`: http://www.djangoproject.com/documentation/sessions/
|
||||
.. _`session documentation`: ../sessions/
|
||||
|
||||
``raw_post_data``
|
||||
The raw HTTP POST data. This is only useful for advanced processing. Use
|
||||
|
|
|
@ -27,7 +27,7 @@ If you don't want to use sessions, you might as well remove the
|
|||
``SessionMiddleware`` line from ``MIDDLEWARE_CLASSES`` and ``'django.contrib.sessions'``
|
||||
from your ``INSTALLED_APPS``. It'll save you a small bit of overhead.
|
||||
|
||||
.. _middleware: http://www.djangoproject.com/documentation/middleware/
|
||||
.. _middleware: ../middleware/
|
||||
|
||||
Using sessions in views
|
||||
=======================
|
||||
|
@ -290,7 +290,7 @@ Whether to save the session data on every request. If this is ``False``
|
|||
(default), then the session data will only be saved if it has been modified --
|
||||
that is, if any of its dictionary values have been assigned or deleted.
|
||||
|
||||
.. _Django settings: http://www.djangoproject.com/documentation/settings/
|
||||
.. _Django settings: ../settings/
|
||||
|
||||
Technical details
|
||||
=================
|
||||
|
|
|
@ -59,7 +59,7 @@ Use the ``--settings`` command-line argument to specify the settings manually::
|
|||
|
||||
django-admin.py runserver --settings=mysite.settings
|
||||
|
||||
.. _django-admin.py: http://www.djangoproject.com/documentation/django_admin/
|
||||
.. _django-admin.py: ../django_admin/
|
||||
|
||||
On the server (mod_python)
|
||||
--------------------------
|
||||
|
@ -75,7 +75,7 @@ settings file to use. Do that with ``SetEnv``::
|
|||
|
||||
Read the `Django mod_python documentation`_ for more information.
|
||||
|
||||
.. _Django mod_python documentation: http://www.djangoproject.com/documentation/modpython/
|
||||
.. _Django mod_python documentation: ../modpython/
|
||||
|
||||
Default settings
|
||||
================
|
||||
|
@ -102,7 +102,7 @@ between the current settings file and Django's default settings.
|
|||
|
||||
For more, see the `diffsettings documentation`_.
|
||||
|
||||
.. _diffsettings documentation: http://www.djangoproject.com/documentation/django_admin/#diffsettings
|
||||
.. _diffsettings documentation: ../django_admin/#diffsettings
|
||||
|
||||
Using settings in Python code
|
||||
=============================
|
||||
|
@ -306,7 +306,7 @@ pages -- and, possibly, by other parts of the system. See
|
|||
|
||||
See also DATETIME_FORMAT, TIME_FORMAT, YEAR_MONTH_FORMAT and MONTH_DAY_FORMAT.
|
||||
|
||||
.. _allowed date format strings: http://www.djangoproject.com/documentation/templates/#now
|
||||
.. _allowed date format strings: ../templates/#now
|
||||
|
||||
DATETIME_FORMAT
|
||||
---------------
|
||||
|
@ -319,7 +319,7 @@ pages -- and, possibly, by other parts of the system. See
|
|||
|
||||
See also DATE_FORMAT, DATETIME_FORMAT, TIME_FORMAT, YEAR_MONTH_FORMAT and MONTH_DAY_FORMAT.
|
||||
|
||||
.. _allowed date format strings: http://www.djangoproject.com/documentation/templates/#now
|
||||
.. _allowed date format strings: ../templates/#now
|
||||
|
||||
DEBUG
|
||||
-----
|
||||
|
@ -433,7 +433,7 @@ A tuple of strings designating all applications that are enabled in this Django
|
|||
installation. Each string should be a full Python path to a Python package that
|
||||
contains a Django application, as created by `django-admin.py startapp`_.
|
||||
|
||||
.. _django-admin.py startapp: http://www.djangoproject.com/documentation/django_admin/#startapp-appname
|
||||
.. _django-admin.py startapp: ../django_admin/#startapp-appname
|
||||
|
||||
INTERNAL_IPS
|
||||
------------
|
||||
|
@ -464,7 +464,7 @@ A string representing the language code for this installation. This should be
|
|||
in standard language format. For example, U.S. English is ``"en-us"``. See the
|
||||
`internationalization docs`_.
|
||||
|
||||
.. _internationalization docs: http://www.djangoproject.com/documentation/i18n/
|
||||
.. _internationalization docs: ../i18n/
|
||||
|
||||
LANGUAGES
|
||||
---------
|
||||
|
@ -617,7 +617,7 @@ Default: Not defined
|
|||
A string representing the full Python import path to your root URLconf. For example:
|
||||
``"mydjangoapps.urls"``. See `How Django processes a request`_.
|
||||
|
||||
.. _How Django processes a request: http://www.djangoproject.com/documentation/url_dispatch/#how-django-processes-a-request
|
||||
.. _How Django processes a request: ../url_dispatch/#how-django-processes-a-request
|
||||
|
||||
SECRET_KEY
|
||||
----------
|
||||
|
@ -709,7 +709,7 @@ and a single database can manage content for multiple sites.
|
|||
|
||||
See the `site framework docs`_.
|
||||
|
||||
.. _site framework docs: http://www.djangoproject.com/documentation/sites/
|
||||
.. _site framework docs: ../sites/
|
||||
|
||||
TEMPLATE_CONTEXT_PROCESSORS
|
||||
---------------------------
|
||||
|
@ -765,7 +765,7 @@ Default: ``''`` (Empty string)
|
|||
Output, as a string, that the template system should use for invalid (e.g.
|
||||
misspelled) variables. See `How invalid variables are handled`_.
|
||||
|
||||
.. _How invalid variables are handled: http://www.djangoproject.com/documentation/templates_python/#how-invalid-variables-are-handled
|
||||
.. _How invalid variables are handled: ../templates_python/#how-invalid-variables-are-handled
|
||||
|
||||
TEST_RUNNER
|
||||
-----------
|
||||
|
@ -803,7 +803,7 @@ pages -- and, possibly, by other parts of the system. See
|
|||
See also DATE_FORMAT, DATETIME_FORMAT, TIME_FORMAT, YEAR_MONTH_FORMAT and
|
||||
MONTH_DAY_FORMAT.
|
||||
|
||||
.. _allowed date format strings: http://www.djangoproject.com/documentation/templates/#now
|
||||
.. _allowed date format strings: ../templates/#now
|
||||
|
||||
TIME_ZONE
|
||||
---------
|
||||
|
@ -873,11 +873,11 @@ Different locales have different formats. For example, U.S. English would say
|
|||
See `allowed date format strings`_. See also DATE_FORMAT, DATETIME_FORMAT,
|
||||
TIME_FORMAT and MONTH_DAY_FORMAT.
|
||||
|
||||
.. _cache docs: http://www.djangoproject.com/documentation/cache/
|
||||
.. _middleware docs: http://www.djangoproject.com/documentation/middleware/
|
||||
.. _session docs: http://www.djangoproject.com/documentation/sessions/
|
||||
.. _cache docs: ../cache/
|
||||
.. _middleware docs: ../middleware/
|
||||
.. _session docs: ../sessions/
|
||||
.. _See available choices: http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
|
||||
.. _template documentation: http://www.djangoproject.com/documentation/templates_python/
|
||||
.. _template documentation: ../templates_python/
|
||||
|
||||
Creating your own settings
|
||||
==========================
|
||||
|
|
|
@ -23,8 +23,8 @@ you express this information in Python code.
|
|||
It works much like Django's `syndication framework`_. To create a sitemap, just
|
||||
write a ``Sitemap`` class and point to it in your URLconf_.
|
||||
|
||||
.. _syndication framework: http://www.djangoproject.com/documentation/syndication/
|
||||
.. _URLconf: http://www.djangoproject.com/documentation/url_dispatch/
|
||||
.. _syndication framework: ../syndication/
|
||||
.. _URLconf: ../url_dispatch/
|
||||
|
||||
Installation
|
||||
============
|
||||
|
@ -41,9 +41,9 @@ To install the sitemap app, follow these steps:
|
|||
reason it needs to go into ``INSTALLED_APPS`` is so that the
|
||||
``load_template_source`` template loader can find the default templates.)
|
||||
|
||||
.. _INSTALLED_APPS: http://www.djangoproject.com/documentation/settings/#installed-apps
|
||||
.. _TEMPLATE_LOADERS: http://www.djangoproject.com/documentation/settings/#template-loaders
|
||||
.. _sites framework: http://www.djangoproject.com/documentation/sites/
|
||||
.. _INSTALLED_APPS: ../settings/#installed-apps
|
||||
.. _TEMPLATE_LOADERS: ../settings/#template-loaders
|
||||
.. _sites framework: ../sites/
|
||||
|
||||
Initialization
|
||||
==============
|
||||
|
@ -68,7 +68,7 @@ The sitemap view takes an extra, required argument: ``{'sitemaps': sitemaps}``.
|
|||
``NewsSitemap``). It may also map to an *instance* of a ``Sitemap`` class
|
||||
(e.g., ``BlogSitemap(some_var)``).
|
||||
|
||||
.. _URLconf: http://www.djangoproject.com/documentation/url_dispatch/
|
||||
.. _URLconf: ../url_dispatch/
|
||||
|
||||
Sitemap classes
|
||||
===============
|
||||
|
@ -217,8 +217,8 @@ defined for the current ``SITE_ID`` (see the `sites documentation`_) and
|
|||
creates an entry in the sitemap. These entries include only the ``location``
|
||||
attribute -- not ``lastmod``, ``changefreq`` or ``priority``.
|
||||
|
||||
.. _flatpages: http://www.djangoproject.com/documentation/flatpages/
|
||||
.. _sites documentation: http://www.djangoproject.com/documentation/sites/
|
||||
.. _flatpages: ../flatpages/
|
||||
.. _sites documentation: ../sites/
|
||||
|
||||
``GenericSitemap``
|
||||
------------------
|
||||
|
@ -232,7 +232,7 @@ the ``lastmod`` attribute in the generated sitemap. You may also pass
|
|||
``priority`` and ``changefreq`` keyword arguments to the ``GenericSitemap``
|
||||
constructor to specify these attributes for all URLs.
|
||||
|
||||
.. _generic views: http://www.djangoproject.com/documentation/generic_views/
|
||||
.. _generic views: ../generic_views/
|
||||
|
||||
Example
|
||||
-------
|
||||
|
@ -261,7 +261,7 @@ Here's an example of a URLconf_ using both::
|
|||
(r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})
|
||||
)
|
||||
|
||||
.. _URLconf: http://www.djangoproject.com/documentation/url_dispatch/
|
||||
.. _URLconf: ../url_dispatch/
|
||||
|
||||
Creating a sitemap index
|
||||
========================
|
||||
|
|
|
@ -276,8 +276,8 @@ you want your admin site to have access to all objects (not just site-specific
|
|||
ones), put ``objects = models.Manager()`` in your model, before you define
|
||||
``CurrentSiteManager``.
|
||||
|
||||
.. _manager: http://www.djangoproject.com/documentation/model_api/#managers
|
||||
.. _manager documentation: http://www.djangoproject.com/documentation/model_api/#managers
|
||||
.. _manager: ../model_api/#managers
|
||||
.. _manager documentation: ../model_api/#managers
|
||||
|
||||
How Django uses the sites framework
|
||||
===================================
|
||||
|
@ -316,7 +316,7 @@ Here's how Django uses the sites framework:
|
|||
* The shortcut view (``django.views.defaults.shortcut``) uses the domain of
|
||||
the current ``Site`` object when calculating an object's URL.
|
||||
|
||||
.. _redirects framework: http://www.djangoproject.com/documentation/redirects/
|
||||
.. _flatpages framework: http://www.djangoproject.com/documentation/flatpages/
|
||||
.. _syndication framework: http://www.djangoproject.com/documentation/syndication/
|
||||
.. _authentication framework: http://www.djangoproject.com/documentation/authentication/
|
||||
.. _redirects framework: ../redirects/
|
||||
.. _flatpages framework: ../flatpages/
|
||||
.. _syndication framework: ../syndication/
|
||||
.. _authentication framework: ../authentication/
|
||||
|
|
|
@ -24,7 +24,7 @@ production setting. Use this only for development.
|
|||
For information on serving static files in an Apache production environment,
|
||||
see the `Django mod_python documentation`_.
|
||||
|
||||
.. _Django mod_python documentation: http://www.djangoproject.com/documentation/modpython/#serving-media-files
|
||||
.. _Django mod_python documentation: ../modpython/#serving-media-files
|
||||
|
||||
How to do it
|
||||
============
|
||||
|
@ -49,7 +49,7 @@ Examples:
|
|||
* The file ``/path/bar.jpg`` will not be accessible, because it doesn't
|
||||
fall under the document root.
|
||||
|
||||
.. _URLconf: http://www.djangoproject.com/documentation/url_dispatch/
|
||||
.. _URLconf: ../url_dispatch/
|
||||
|
||||
Directory listings
|
||||
==================
|
||||
|
@ -122,4 +122,4 @@ associated with the ``django.views.static.serve`` view. If not
|
|||
Of course, the catch here is that you'll have to remember to set ``DEBUG=False``
|
||||
in your production settings file. But you should be doing that anyway.
|
||||
|
||||
.. _DEBUG setting: http://www.djangoproject.com/documentation/settings/#debug
|
||||
.. _DEBUG setting: ../settings/#debug
|
||||
|
|
|
@ -26,7 +26,7 @@ to determine which feed to output.
|
|||
|
||||
To create a feed, just write a ``Feed`` class and point to it in your URLconf_.
|
||||
|
||||
.. _URLconf: http://www.djangoproject.com/documentation/url_dispatch/
|
||||
.. _URLconf: ../url_dispatch/
|
||||
|
||||
Initialization
|
||||
--------------
|
||||
|
@ -72,8 +72,8 @@ The above example registers two feeds:
|
|||
|
||||
Once that's set up, you just need to define the ``Feed`` classes themselves.
|
||||
|
||||
.. _URLconf: http://www.djangoproject.com/documentation/url_dispatch/
|
||||
.. _settings file: http://www.djangoproject.com/documentation/settings/
|
||||
.. _URLconf: ../url_dispatch/
|
||||
.. _settings file: ../settings/
|
||||
|
||||
Feed classes
|
||||
------------
|
||||
|
@ -156,8 +156,8 @@ put into those elements.
|
|||
{{ obj.description }}
|
||||
|
||||
.. _chicagocrime.org: http://www.chicagocrime.org/
|
||||
.. _object-relational mapper: http://www.djangoproject.com/documentation/db_api/
|
||||
.. _Django templates: http://www.djangoproject.com/documentation/templates/
|
||||
.. _object-relational mapper: ../db_api/
|
||||
.. _Django templates: ../templates/
|
||||
|
||||
A complex example
|
||||
-----------------
|
||||
|
@ -277,7 +277,7 @@ Feeds created by the syndication framework automatically include the
|
|||
appropriate ``<language>`` tag (RSS 2.0) or ``xml:lang`` attribute (Atom). This
|
||||
comes directly from your `LANGUAGE_CODE setting`_.
|
||||
|
||||
.. _LANGUAGE_CODE setting: http://www.djangoproject.com/documentation/settings/#language-code
|
||||
.. _LANGUAGE_CODE setting: ../settings/#language-code
|
||||
|
||||
URLs
|
||||
----
|
||||
|
@ -292,7 +292,7 @@ Atom feeds require a ``<link rel="self">`` that defines the feed's current
|
|||
location. The syndication framework populates this automatically, using the
|
||||
domain of the current site according to the SITE_ID setting.
|
||||
|
||||
.. _SITE_ID setting: http://www.djangoproject.com/documentation/settings/#site-id
|
||||
.. _SITE_ID setting: ../settings/#site-id
|
||||
|
||||
Publishing Atom and RSS feeds in tandem
|
||||
---------------------------------------
|
||||
|
|
|
@ -792,7 +792,7 @@ Note that if you use ``{% ssi %}``, you'll need to define
|
|||
|
||||
See also: ``{% include %}``.
|
||||
|
||||
.. _ALLOWED_INCLUDE_ROOTS: http://www.djangoproject.com/documentation/settings/#allowed-include-roots
|
||||
.. _ALLOWED_INCLUDE_ROOTS: ../settings/#allowed-include-roots
|
||||
|
||||
templatetag
|
||||
~~~~~~~~~~~
|
||||
|
@ -1218,7 +1218,7 @@ django.contrib.humanize
|
|||
A set of Django template filters useful for adding a "human touch" to data. See
|
||||
the `humanize documentation`_.
|
||||
|
||||
.. _humanize documentation: http://www.djangoproject.com/documentation/add_ons/#humanize
|
||||
.. _humanize documentation: ../add_ons/#humanize
|
||||
|
||||
django.contrib.markup
|
||||
---------------------
|
||||
|
|
|
@ -11,7 +11,7 @@ If you're looking to use the Django template system as part of another
|
|||
application -- i.e., without the rest of the framework -- make sure to read
|
||||
the `configuration`_ section later in this document.
|
||||
|
||||
.. _`The Django template language: For template authors`: http://www.djangoproject.com/documentation/templates/
|
||||
.. _`The Django template language: For template authors`: ../templates/
|
||||
|
||||
Basics
|
||||
======
|
||||
|
@ -327,8 +327,8 @@ Note::
|
|||
|
||||
Here's what each of the default processors does:
|
||||
|
||||
.. _HttpRequest object: http://www.djangoproject.com/documentation/request_response/#httprequest-objects
|
||||
.. _TEMPLATE_CONTEXT_PROCESSORS setting: http://www.djangoproject.com/documentation/settings/#template-context-processors
|
||||
.. _HttpRequest object: ../request_response/#httprequest-objects
|
||||
.. _TEMPLATE_CONTEXT_PROCESSORS setting: ../settings/#template-context-processors
|
||||
|
||||
django.core.context_processors.auth
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -353,9 +353,9 @@ If ``TEMPLATE_CONTEXT_PROCESSORS`` contains this processor, every
|
|||
permissions that the currently logged-in user has. See the `permissions
|
||||
docs`_.
|
||||
|
||||
.. _user authentication docs: http://www.djangoproject.com/documentation/authentication/#users
|
||||
.. _message docs: http://www.djangoproject.com/documentation/authentication/#messages
|
||||
.. _permissions docs: http://www.djangoproject.com/documentation/authentication/#permissions
|
||||
.. _user authentication docs: ../authentication/#users
|
||||
.. _message docs: ../authentication/#messages
|
||||
.. _permissions docs: ../authentication/#permissions
|
||||
|
||||
django.core.context_processors.debug
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -383,9 +383,9 @@ If ``TEMPLATE_CONTEXT_PROCESSORS`` contains this processor, every
|
|||
|
||||
See the `internationalization docs`_ for more.
|
||||
|
||||
.. _LANGUAGES setting: http://www.djangoproject.com/documentation/settings/#languages
|
||||
.. _LANGUAGE_CODE setting: http://www.djangoproject.com/documentation/settings/#language-code
|
||||
.. _internationalization docs: http://www.djangoproject.com/documentation/i18n/
|
||||
.. _LANGUAGES setting: ../settings/#languages
|
||||
.. _LANGUAGE_CODE setting: ../settings/#language-code
|
||||
.. _internationalization docs: ../i18n/
|
||||
|
||||
django.core.context_processors.request
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -944,7 +944,7 @@ The ``takes_context`` parameter defaults to ``False``. When it's set to *True*,
|
|||
the tag is passed the context object, as in this example. That's the only
|
||||
difference between this case and the previous ``inclusion_tag`` example.
|
||||
|
||||
.. _tutorials: http://www.djangoproject.com/documentation/tutorial1/#creating-models
|
||||
.. _tutorials: ../tutorial1/#creating-models
|
||||
|
||||
Setting a variable in the context
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -1115,5 +1115,5 @@ settings you wish to specify. You might want to consider setting at least
|
|||
`settings documentation`_, and any setting starting with *TEMPLATE_*
|
||||
is of obvious interest.
|
||||
|
||||
.. _settings file: http://www.djangoproject.com/documentation/settings/#using-settings-without-the-django-settings-module-environment-variable
|
||||
.. _settings documentation: http://www.djangoproject.com/documentation/settings/
|
||||
.. _settings file: ../settings/#using-settings-without-the-django-settings-module-environment-variable
|
||||
.. _settings documentation: ../settings/
|
||||
|
|
|
@ -17,7 +17,7 @@ installed by running the Python interactive interpreter and typing
|
|||
``import django``. If that command runs successfully, with no errors, Django is
|
||||
installed.
|
||||
|
||||
.. _`Django installed`: http://www.djangoproject.com/documentation/install/
|
||||
.. _`Django installed`: ../install/
|
||||
|
||||
Creating a project
|
||||
==================
|
||||
|
@ -108,7 +108,7 @@ It worked!
|
|||
|
||||
Full docs for the development server are at `django-admin documentation`_.
|
||||
|
||||
.. _django-admin documentation: http://www.djangoproject.com/documentation/django_admin/
|
||||
.. _django-admin documentation: ../django_admin/
|
||||
|
||||
Database setup
|
||||
--------------
|
||||
|
@ -378,7 +378,7 @@ as you like, and it will only ever create the tables that don't exist.
|
|||
Read the `django-admin.py documentation`_ for full information on what the
|
||||
``manage.py`` utility can do.
|
||||
|
||||
.. _django-admin.py documentation: http://www.djangoproject.com/documentation/django_admin/
|
||||
.. _django-admin.py documentation: ../django_admin/
|
||||
|
||||
Playing with the API
|
||||
====================
|
||||
|
@ -555,5 +555,5 @@ For full details on the database API, see our `Database API reference`_.
|
|||
When you're comfortable with the API, read `part 2 of this tutorial`_ to get
|
||||
Django's automatic admin working.
|
||||
|
||||
.. _Database API reference: http://www.djangoproject.com/documentation/db_api/
|
||||
.. _part 2 of this tutorial: http://www.djangoproject.com/documentation/tutorial2/
|
||||
.. _Database API reference: ../db_api/
|
||||
.. _part 2 of this tutorial: ../tutorial2/
|
||||
|
|
|
@ -5,7 +5,7 @@ Writing your first Django app, part 2
|
|||
This tutorial begins where `Tutorial 1`_ left off. We're continuing the Web-poll
|
||||
application and will focus on Django's automatically-generated admin site.
|
||||
|
||||
.. _Tutorial 1: http://www.djangoproject.com/documentation/tutorial1/
|
||||
.. _Tutorial 1: ../tutorial1/
|
||||
|
||||
.. admonition:: Philosophy
|
||||
|
||||
|
@ -64,7 +64,7 @@ tutorial, remember?) You should see the Django admin index page:
|
|||
By default, you should see two types of editable content: groups and users.
|
||||
These are core features Django ships with by default.
|
||||
|
||||
.. _"I can't log in" questions: http://www.djangoproject.com/documentation/faq/#the-admin-site
|
||||
.. _"I can't log in" questions: ../faq/#the-admin-site
|
||||
|
||||
Make the poll app modifiable in the admin
|
||||
=========================================
|
||||
|
@ -402,7 +402,7 @@ Django automatically looks for a ``templates/`` subdirectory within each app
|
|||
package, for use as a fallback. See the `loader types documentation`_ for full
|
||||
information.
|
||||
|
||||
.. _loader types documentation: http://www.djangoproject.com/documentation/templates_python/#loader-types
|
||||
.. _loader types documentation: ../templates_python/#loader-types
|
||||
|
||||
Customize the admin index page
|
||||
==============================
|
||||
|
@ -433,5 +433,5 @@ general, see the `Django admin CSS guide`_.
|
|||
When you're comfortable with the admin site, read `part 3 of this tutorial`_ to
|
||||
start working on public poll views.
|
||||
|
||||
.. _Django admin CSS guide: http://www.djangoproject.com/documentation/admin_css/
|
||||
.. _part 3 of this tutorial: http://www.djangoproject.com/documentation/tutorial3/
|
||||
.. _Django admin CSS guide: ../admin_css/
|
||||
.. _part 3 of this tutorial: ../tutorial3/
|
||||
|
|
|
@ -5,7 +5,7 @@ Writing your first Django app, part 3
|
|||
This tutorial begins where `Tutorial 2`_ left off. We're continuing the Web-poll
|
||||
application and will focus on creating the public interface -- "views."
|
||||
|
||||
.. _Tutorial 2: http://www.djangoproject.com/documentation/tutorial2/
|
||||
.. _Tutorial 2: ../tutorial2/
|
||||
|
||||
Philosophy
|
||||
==========
|
||||
|
@ -117,8 +117,8 @@ time the URLconf module is loaded. They're super fast.
|
|||
|
||||
.. _Wikipedia's entry: http://en.wikipedia.org/wiki/Regular_expression
|
||||
.. _Python documentation: http://www.python.org/doc/current/lib/module-re.html
|
||||
.. _request and response documentation: http://www.djangoproject.com/documentation/request_response/
|
||||
.. _URLconf documentation: http://www.djangoproject.com/documentation/url_dispatch/
|
||||
.. _request and response documentation: ../request_response/
|
||||
.. _URLconf documentation: ../url_dispatch/
|
||||
|
||||
Write your first view
|
||||
=====================
|
||||
|
@ -376,7 +376,7 @@ iterable of Choice objects and is suitable for use in the ``{% for %}`` tag.
|
|||
|
||||
See the `template guide`_ for full details on how templates work.
|
||||
|
||||
.. _template guide: http://www.djangoproject.com/documentation/templates/
|
||||
.. _template guide: ../templates/
|
||||
|
||||
Simplifying the URLconfs
|
||||
========================
|
||||
|
@ -463,4 +463,4 @@ All the poll app cares about is its relative URLs, not its absolute URLs.
|
|||
When you're comfortable with writing views, read `part 4 of this tutorial`_ to
|
||||
learn about simple form processing and generic views.
|
||||
|
||||
.. _part 4 of this tutorial: http://www.djangoproject.com/documentation/tutorial4/
|
||||
.. _part 4 of this tutorial: ../tutorial4/
|
||||
|
|
|
@ -120,7 +120,7 @@ Now, go to ``/polls/1/`` in your browser and vote in the poll. You should see a
|
|||
results page that gets updated each time you vote. If you submit the form
|
||||
without having chosen a choice, you should see the error message.
|
||||
|
||||
.. _request and response documentation: http://www.djangoproject.com/documentation/request_response/
|
||||
.. _request and response documentation: ../request_response/
|
||||
|
||||
Use generic views: Less code is better
|
||||
======================================
|
||||
|
@ -226,7 +226,7 @@ Run the server, and use your new polling app based on generic views.
|
|||
|
||||
For full details on generic views, see the `generic views documentation`_.
|
||||
|
||||
.. _generic views documentation: http://www.djangoproject.com/documentation/generic_views/
|
||||
.. _generic views documentation: ../generic_views/
|
||||
|
||||
Coming soon
|
||||
===========
|
||||
|
@ -241,4 +241,4 @@ installments:
|
|||
* Advanced admin features: Permissions
|
||||
* Advanced admin features: Custom JavaScript
|
||||
|
||||
.. _Tutorial 3: http://www.djangoproject.com/documentation/tutorial3/
|
||||
.. _Tutorial 3: ../tutorial3/
|
||||
|
|
|
@ -45,8 +45,8 @@ algorithm the system follows to determine which Python code to execute:
|
|||
`request object`_ as its first argument and any values captured in the
|
||||
regex as remaining arguments.
|
||||
|
||||
.. _settings file: http://www.djangoproject.com/documentation/settings/
|
||||
.. _request object: http://www.djangoproject.com/documentation/request_response/#httprequest-objects
|
||||
.. _settings file: ../settings/
|
||||
.. _request object: ../request_response/#httprequest-objects
|
||||
|
||||
Example
|
||||
=======
|
||||
|
@ -387,8 +387,8 @@ In this example, for a request to ``/blog/2005/``, Django will call the
|
|||
This technique is used in `generic views`_ and in the `syndication framework`_
|
||||
to pass metadata and options to views.
|
||||
|
||||
.. _generic views: http://www.djangoproject.com/documentation/generic_views/
|
||||
.. _syndication framework: http://www.djangoproject.com/documentation/syndication/
|
||||
.. _generic views: ../generic_views/
|
||||
.. _syndication framework: ../syndication/
|
||||
|
||||
Passing extra options to ``include()``
|
||||
--------------------------------------
|
||||
|
|
Loading…
Reference in New Issue