From 7f2b36050ee0c9e939d88f9ce368d1ccc2f67266 Mon Sep 17 00:00:00 2001 From: Gabriel Hurley Date: Sun, 7 Nov 2010 01:42:55 +0000 Subject: [PATCH] Fixed #10904 -- Corrected inappropriate usage of the term "absolute URL" throughout the docs. Replaced with the (RFC 2396-compliant) terms "absolute path reference" or "absolute path" as appropriate for the context. Thanks to sharan666 for the report, and Malcolm, Chris, and dwillis for their work in supplying a solution and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14482 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/faq/usage.txt | 2 +- docs/intro/tutorial03.txt | 4 ++-- docs/ref/contrib/sitemaps.txt | 19 ++++++++++--------- docs/ref/contrib/syndication.txt | 2 +- docs/ref/models/fields.txt | 2 +- docs/ref/models/instances.txt | 2 +- docs/ref/request-response.txt | 6 +++--- docs/ref/templates/builtins.txt | 7 ++++--- 8 files changed, 23 insertions(+), 21 deletions(-) diff --git a/docs/faq/usage.txt b/docs/faq/usage.txt index 856b97c35c..c11514c4cd 100644 --- a/docs/faq/usage.txt +++ b/docs/faq/usage.txt @@ -63,7 +63,7 @@ Using a :class:`~django.db.models.FileField` or an (relative to :setting:`MEDIA_ROOT`). You'll most likely want to use the convenience :attr:`~django.core.files.File.url` attribute provided by Django. For example, if your :class:`~django.db.models.ImageField` is - called ``mug_shot``, you can get the absolute URL to your image in a + called ``mug_shot``, you can get the absolute path to your image in a template with ``{{ object.mug_shot.url }}``. How do I make a variable available to all my templates? diff --git a/docs/intro/tutorial03.txt b/docs/intro/tutorial03.txt index 8f6061a14e..0843d9e48f 100644 --- a/docs/intro/tutorial03.txt +++ b/docs/intro/tutorial03.txt @@ -538,9 +538,9 @@ this:: The idea behind :func:`~django.conf.urls.defaults.include` and URLconf decoupling is to make it easy to plug-and-play URLs. Now that polls are in their own URLconf, they can be placed under "/polls/", or under "/fun_polls/", or -under "/content/polls/", or any other URL root, and the app will still work. +under "/content/polls/", or any other path root, and the app will still work. -All the poll app cares about is its relative URLs, not its absolute URLs. +All the poll app cares about is its relative path, not its absolute path. When you're comfortable with writing views, read :doc:`part 4 of this tutorial ` to learn about simple form processing and generic views. diff --git a/docs/ref/contrib/sitemaps.txt b/docs/ref/contrib/sitemaps.txt index 50bc10c4b6..b58b55cab4 100644 --- a/docs/ref/contrib/sitemaps.txt +++ b/docs/ref/contrib/sitemaps.txt @@ -143,21 +143,22 @@ Sitemap class reference **Optional.** Either a method or attribute. - If it's a method, it should return the absolute URL for a given object as - returned by :attr:`~Sitemap.items()`. + If it's a method, it should return the absolute path for a given object + as returned by :attr:`~Sitemap.items()`. - If it's an attribute, its value should be a string representing an absolute URL - to use for *every* object returned by :attr:`~Sitemap.items()`. + If it's an attribute, its value should be a string representing an + absolute path to use for *every* object returned by + :attr:`~Sitemap.items()`. - In both cases, "absolute URL" means a URL that doesn't include the protocol or - domain. Examples: + In both cases, "absolute path" means a URL that doesn't include the + protocol or domain. Examples: * Good: :file:`'/foo/bar/'` * Bad: :file:`'example.com/foo/bar/'` * Bad: :file:`'http://example.com/foo/bar/'` - If :attr:`~Sitemap.location` isn't provided, the framework will call the - ``get_absolute_url()`` method on each object as returned by + If :attr:`~Sitemap.location` isn't provided, the framework will call + the ``get_absolute_url()`` method on each object as returned by :attr:`~Sitemap.items()`. .. attribute:: Sitemap.lastmod @@ -300,7 +301,7 @@ that: :func:`django.contrib.sitemaps.ping_google()`. .. function:: ping_google :func:`ping_google` takes an optional argument, :data:`sitemap_url`, - which should be the absolute URL of your site's sitemap (e.g., + which should be the absolute path to your site's sitemap (e.g., :file:`'/sitemap.xml'`). If this argument isn't provided, :func:`ping_google` will attempt to figure out your sitemap by performing a reverse looking in your URLconf. diff --git a/docs/ref/contrib/syndication.txt b/docs/ref/contrib/syndication.txt index a12d646a08..04f14b5531 100644 --- a/docs/ref/contrib/syndication.txt +++ b/docs/ref/contrib/syndication.txt @@ -274,7 +274,7 @@ comes directly from your :setting:`LANGUAGE_CODE` setting. URLs ---- -The :attr:`link` method/attribute can return either an absolute URL (e.g. +The :attr:`link` method/attribute can return either an absolute path (e.g. :file:`"/blog/"`) or a URL with the fully-qualified domain and protocol (e.g. ``"http://www.example.com/blog/"``). If :attr:`link` doesn't return the domain, the syndication framework will insert the domain of the current site, according diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index fe87365783..cebd893ee9 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -539,7 +539,7 @@ takes a few steps: (relative to :setting:`MEDIA_ROOT`). You'll most likely want to use the convenience :attr:`~django.core.files.File.url` function provided by Django. For example, if your :class:`ImageField` is called ``mug_shot``, - you can get the absolute URL to your image in a template with + you can get the absolute path to your image in a template with ``{{ object.mug_shot.url }}``. For example, say your :setting:`MEDIA_ROOT` is set to ``'/home/media'``, and diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt index 6ab65b03cb..88fd4e1fac 100644 --- a/docs/ref/models/instances.txt +++ b/docs/ref/models/instances.txt @@ -491,7 +491,7 @@ Similarly, if you had a URLconf entry that looked like:: Notice that we specify an empty sequence for the second parameter in this case, because we only want to pass keyword parameters, not positional ones. -In this way, you're tying the model's absolute URL to the view that is used +In this way, you're tying the model's absolute path to the view that is used to display it, without repeating the URL information anywhere. You can still use the ``get_absolute_url`` method in templates, as before. diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt index 5a317aee06..6cd328475b 100644 --- a/docs/ref/request-response.txt +++ b/docs/ref/request-response.txt @@ -605,9 +605,9 @@ types of HTTP responses. Like ``HttpResponse``, these subclasses live in .. class:: HttpResponseRedirect The constructor takes a single argument -- the path to redirect to. This - can be a fully qualified URL (e.g. ``'http://www.yahoo.com/search/'``) or an - absolute URL with no domain (e.g. ``'/search/'``). Note that this returns - an HTTP status code 302. + can be a fully qualified URL (e.g. ``'http://www.yahoo.com/search/'``) or + an absolute path with no domain (e.g. ``'/search/'``). Note that this + returns an HTTP status code 302. .. class:: HttpResponsePermanentRedirect diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 5fdef71a5f..9839fc7d5c 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -868,9 +868,10 @@ The argument tells which template bit to output: url ~~~ -Returns an absolute URL (i.e., a URL without the domain name) matching a given -view function and optional parameters. This is a way to output links without -violating the DRY principle by having to hard-code URLs in your templates:: +Returns an absolute path reference (a URL without the domain name) matching a +given view function and optional parameters. This is a way to output links +without violating the DRY principle by having to hard-code URLs in your +templates:: {% url path.to.some_view v1 v2 %}