Ticket #10904: 10904.diff

File 10904.diff, 8.9 KB (added by Derek Willis, 14 years ago)
  • docs/faq/usage.txt

    From db896a620e227628b90014dcd1b7220fc98ce6db Mon Sep 17 00:00:00 2001
    From: Derek Willis <dwillis@gmail.com>
    Date: Sat, 18 Sep 2010 23:15:36 -0400
    Subject: [PATCH] Replaced absolute URL with absolute path reference in docs
    
    ---
     docs/faq/usage.txt               |    4 ++--
     docs/intro/tutorial03.txt        |    3 ++-
     docs/ref/contrib/sitemaps.txt    |   14 +++++++-------
     docs/ref/contrib/syndication.txt |    6 +++---
     docs/ref/models/fields.txt       |    2 +-
     docs/ref/models/instances.txt    |    6 +++---
     docs/ref/request-response.txt    |    4 ++--
     docs/ref/templates/builtins.txt  |    7 ++++---
     docs/topics/auth.txt             |    8 ++++----
     9 files changed, 28 insertions(+), 26 deletions(-)
    
    diff --git a/docs/faq/usage.txt b/docs/faq/usage.txt
    index 856b97c..5c4cd5f 100644
    a b Using a :class:`~django.db.models.FileField` or an  
    6363       (relative to :setting:`MEDIA_ROOT`). You'll most likely want to use the
    6464       convenience :attr:`~django.core.files.File.url` attribute provided by
    6565       Django. For example, if your :class:`~django.db.models.ImageField` is
    66        called ``mug_shot``, you can get the absolute URL to your image in a
    67        template with ``{{ object.mug_shot.url }}``.
     66       called ``mug_shot``, you can get the absolute path reference to your
     67       image in a template with ``{{ object.mug_shot.url }}``.
    6868
    6969How do I make a variable available to all my templates?
    7070-------------------------------------------------------
  • docs/intro/tutorial03.txt

    diff --git a/docs/intro/tutorial03.txt b/docs/intro/tutorial03.txt
    index d347035..3599af4 100644
    a b decoupling is to make it easy to plug-and-play URLs. Now that polls are in their  
    514514own URLconf, they can be placed under "/polls/", or under "/fun_polls/", or
    515515under "/content/polls/", or any other URL root, and the app will still work.
    516516
    517 All the poll app cares about is its relative URLs, not its absolute URLs.
     517All the poll app cares about is its relative URLs, not its absolute path
     518references.
    518519
    519520When you're comfortable with writing views, read :doc:`part 4 of this tutorial
    520521</intro/tutorial04>` to learn about simple form processing and generic views.
  • docs/ref/contrib/sitemaps.txt

    diff --git a/docs/ref/contrib/sitemaps.txt b/docs/ref/contrib/sitemaps.txt
    index 7a66cbe..46acb3f 100644
    a b Sitemap class reference  
    143143
    144144        **Optional.** Either a method or attribute.
    145145
    146         If it's a method, it should return the absolute URL for a given object as
    147         returned by :attr:`~Sitemap.items()`.
     146        If it's a method, it should return the absolute path reference for a
     147        given object as returned by :attr:`~Sitemap.items()`.
    148148
    149         If it's an attribute, its value should be a string representing an absolute URL
    150         to use for *every* object returned by :attr:`~Sitemap.items()`.
     149        If it's an attribute, its value should be a string representing an absolute
     150        path reference to use for *every* object returned by :attr:`~Sitemap.items()`.
    151151
    152         In both cases, "absolute URL" means a URL that doesn't include the protocol or
    153         domain. Examples:
     152        In both cases, "absolute path reference" means a URL that doesn't
     153        include the protocol or domain. Examples:
    154154
    155155            * Good: :file:`'/foo/bar/'`
    156156            * Bad: :file:`'example.com/foo/bar/'`
    that: :func:`django.contrib.sitemaps.ping_google()`.  
    300300.. function:: ping_google
    301301
    302302    :func:`ping_google` takes an optional argument, :data:`sitemap_url`,
    303     which should be the absolute URL of your site's sitemap (e.g.,
     303    which should be the absolute path reference of your site's sitemap (e.g.,
    304304    :file:`'/sitemap.xml'`). If this argument isn't provided,
    305305    :func:`ping_google` will attempt to figure out your
    306306    sitemap by performing a reverse looking in your URLconf.
  • docs/ref/contrib/syndication.txt

    diff --git a/docs/ref/contrib/syndication.txt b/docs/ref/contrib/syndication.txt
    index a12d646..acd8ef2 100644
    a b comes directly from your :setting:`LANGUAGE_CODE` setting.  
    274274URLs
    275275----
    276276
    277 The :attr:`link` method/attribute can return either an absolute URL (e.g.
    278 :file:`"/blog/"`) or a URL with the fully-qualified domain and protocol (e.g.
    279 ``"http://www.example.com/blog/"``). If :attr:`link` doesn't return the domain,
     277The :attr:`link` method/attribute can return either an absolute path reference
     278(e.g. :file:`"/blog/"`) or a URL with the fully-qualified domain and protocol
     279(e.g. ``"http://www.example.com/blog/"``). If :attr:`link` doesn't return the domain,
    280280the syndication framework will insert the domain of the current site, according
    281281to your :setting:`SITE_ID setting <SITE_ID>`.
    282282
  • docs/ref/models/fields.txt

    diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
    index 68208b3..4a5c98c 100644
    a b takes a few steps:  
    537537       (relative to :setting:`MEDIA_ROOT`). You'll most likely want to use the
    538538       convenience :attr:`~django.core.files.File.url` function provided by
    539539       Django. For example, if your :class:`ImageField` is called ``mug_shot``,
    540        you can get the absolute URL to your image in a template with
     540       you can get the absolute path reference to your image in a template with
    541541       ``{{ object.mug_shot.url }}``.
    542542
    543543For example, say your :setting:`MEDIA_ROOT` is set to ``'/home/media'``, and
  • docs/ref/models/instances.txt

    diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
    index dfe4c74..251d89b 100644
    a b Similarly, if you had a URLconf entry that looked like::  
    491491Notice that we specify an empty sequence for the second parameter in this case,
    492492because we only want to pass keyword parameters, not positional ones.
    493493
    494 In this way, you're tying the model's absolute URL to the view that is used
    495 to display it, without repeating the URL information anywhere. You can still
    496 use the ``get_absolute_url`` method in templates, as before.
     494In this way, you're tying the model's absolute path reference to the view
     495that is used to display it, without repeating the URL information anywhere.
     496You can still use the ``get_absolute_url`` method in templates, as before.
    497497
    498498In some cases, such as the use of generic views or the re-use of
    499499custom views for multiple models, specifying the view function may
  • docs/ref/request-response.txt

    diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
    index b8b0882..2eb3075 100644
    a b types of HTTP responses. Like ``HttpResponse``, these subclasses live in  
    579579
    580580    The constructor takes a single argument -- the path to redirect to. This
    581581    can be a fully qualified URL (e.g. ``'http://www.yahoo.com/search/'``) or an
    582     absolute URL with no domain (e.g. ``'/search/'``). Note that this returns
    583     an HTTP status code 302.
     582    absolute path reference with no domain (e.g. ``'/search/'``). Note that
     583    this returns an HTTP status code 302.
    584584
    585585.. class:: HttpResponsePermanentRedirect
    586586
  • docs/ref/templates/builtins.txt

    diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
    index 85c0b6d..876480d 100644
    a b The argument tells which template bit to output:  
    915915url
    916916~~~
    917917
    918 Returns an absolute URL (i.e., a URL without the domain name) matching a given
    919 view function and optional parameters. This is a way to output links without
    920 violating the DRY principle by having to hard-code URLs in your templates::
     918Returns an absolute path reference (a URL without the domain name)
     919matching a given view function and optional parameters. This is a way to
     920output links without violating the DRY principle by having to hard-code
     921URLs in your templates::
    921922
    922923    {% url path.to.some_view v1 v2 %}
    923924
  • docs/topics/auth.txt

    diff --git a/docs/topics/auth.txt b/docs/topics/auth.txt
    index 8c9b0f1..955bde6 100644
    a b The login_required decorator  
    728728
    729729        * If the user isn't logged in, redirect to
    730730          :setting:`settings.LOGIN_URL <LOGIN_URL>` (``/accounts/login/`` by
    731           default), passing the current absolute URL in the query string. The
    732           name of the GET argument is determined by the ``redirect_field_name``
    733           argument provided to the decorator. The default argument name is
    734           ``next``. For example:
     731          default), passing the current absolute path reference in the query
     732          string. The name of the GET argument is determined by the
     733          ``redirect_field_name`` argument provided to the decorator. The
     734          default argument name is ``next``. For example:
    735735          ``/accounts/login/?next=/polls/3/``.
    736736
    737737        * If the user is logged in, execute the view normally. The view code is
Back to Top