diff options
| author | Tim Graham <timograham@gmail.com> | 2016-05-08 18:07:43 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-05-08 18:09:10 -0400 |
| commit | 145572adb386dc05bc1302bee4432648b13e7e66 (patch) | |
| tree | c16ab4d1b735d95ab51a845202330f268e7158f8 /docs/intro | |
| parent | 86b346435a6735484c23fc9c798cf5243cbf8124 (diff) | |
[1.9.x] Fixed #26483 -- Updated docs.python.org links to use Intersphinx.
Backport of f5ff5010cd74500785a707ac70b51d292403cddc from master
Diffstat (limited to 'docs/intro')
| -rw-r--r-- | docs/intro/contributing.txt | 3 | ||||
| -rw-r--r-- | docs/intro/overview.txt | 16 | ||||
| -rw-r--r-- | docs/intro/reusable-apps.txt | 6 | ||||
| -rw-r--r-- | docs/intro/tutorial01.txt | 15 |
4 files changed, 17 insertions, 23 deletions
diff --git a/docs/intro/contributing.txt b/docs/intro/contributing.txt index ab183896ae..ac06c1cae3 100644 --- a/docs/intro/contributing.txt +++ b/docs/intro/contributing.txt @@ -370,10 +370,9 @@ that passing a ``prefix`` parameter when creating an instance still works too. * Dive Into Python (a free online book for beginning Python developers) includes a great `introduction to Unit Testing`__. * After reading those, if you want something a little meatier to sink - your teeth into, there's always the `Python unittest documentation`__. + your teeth into, there's always the Python :mod:`unittest` documentation. __ http://www.diveintopython.net/unit_testing/index.html -__ https://docs.python.org/library/unittest.html Running your new test --------------------- diff --git a/docs/intro/overview.txt b/docs/intro/overview.txt index 8b5846f4ed..2324ef8ce5 100644 --- a/docs/intro/overview.txt +++ b/docs/intro/overview.txt @@ -201,15 +201,13 @@ example above: url(r'^articles/([0-9]{4})/([0-9]{2})/([0-9]+)/$', views.article_detail), ] -The code above maps URLs, as simple `regular expressions`_, to the location of -Python callback functions ("views"). The regular expressions use parenthesis to -"capture" values from the URLs. When a user requests a page, Django runs -through each pattern, in order, and stops at the first one that matches the -requested URL. (If none of them matches, Django calls a special-case 404 view.) -This is blazingly fast, because the regular expressions are compiled at load -time. - -.. _regular expressions: https://docs.python.org/howto/regex.html +The code above maps URLs, as simple :ref:`regular expressions <regex-howto>`, +to the location of Python callback functions ("views"). The regular expressions +use parenthesis to "capture" values from the URLs. When a user requests a page, +Django runs through each pattern, in order, and stops at the first one that +matches the requested URL. (If none of them matches, Django calls a +special-case 404 view.) This is blazingly fast, because the regular expressions +are compiled at load time. Once one of the regexes matches, Django imports and calls the given view, which is a simple Python function. Each view gets passed a request object -- diff --git a/docs/intro/reusable-apps.txt b/docs/intro/reusable-apps.txt index fee59a37fa..c0e5e086f6 100644 --- a/docs/intro/reusable-apps.txt +++ b/docs/intro/reusable-apps.txt @@ -34,9 +34,9 @@ projects and ready to publish for others to install and use. .. admonition:: Package? App? - A Python `package <https://docs.python.org/tutorial/modules.html#packages>`_ - provides a way of grouping related Python code for easy reuse. A package - contains one or more files of Python code (also known as "modules"). + A Python :term:`package` provides a way of grouping related Python code for + easy reuse. A package contains one or more files of Python code (also known + as "modules"). A package can be imported with ``import foo.bar`` or ``from foo import bar``. For a directory (like ``polls``) to form a package, it must contain diff --git a/docs/intro/tutorial01.txt b/docs/intro/tutorial01.txt index de86571df3..ba50451d95 100644 --- a/docs/intro/tutorial01.txt +++ b/docs/intro/tutorial01.txt @@ -102,8 +102,8 @@ These files are: anything inside it (e.g. ``mysite.urls``). * :file:`mysite/__init__.py`: An empty file that tells Python that this - directory should be considered a Python package. (Read `more about - packages`_ in the official Python docs if you're a Python beginner.) + directory should be considered a Python package. If you're a Python beginner, + read :ref:`more about packages <tut-packages>` in the official Python docs. * :file:`mysite/settings.py`: Settings/configuration for this Django project. :doc:`/topics/settings` will tell you all about how settings @@ -116,8 +116,6 @@ These files are: * :file:`mysite/wsgi.py`: An entry-point for WSGI-compatible web servers to serve your project. See :doc:`/howto/deployment/wsgi/index` for more details. -.. _more about packages: https://docs.python.org/tutorial/modules.html#packages - The development server ====================== @@ -211,9 +209,10 @@ rather than creating directories. configuration and apps for a particular website. A project can contain multiple apps. An app can be in multiple projects. -Your apps can live anywhere on your `Python path`_. In this tutorial, we'll -create our poll app right next to your :file:`manage.py` file so that it can be -imported as its own top-level module, rather than a submodule of ``mysite``. +Your apps can live anywhere on your :ref:`Python path <tut-searchpath>`. In +this tutorial, we'll create our poll app right next to your :file:`manage.py` +file so that it can be imported as its own top-level module, rather than a +submodule of ``mysite``. To create your app, make sure you're in the same directory as :file:`manage.py` and type this command: @@ -236,8 +235,6 @@ That'll create a directory :file:`polls`, which is laid out like this:: This directory structure will house the poll application. -.. _`Python path`: https://docs.python.org/tutorial/modules.html#the-module-search-path - Write your first view ===================== |
