summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2015-10-16 00:08:37 -0700
committerSteve Piercy <web@stevepiercy.com>2015-10-16 00:08:37 -0700
commit5a49b5537916ad28a70776ab8728b6e885d8a188 (patch)
treee6c19ed2f434a2e898ed403c146ba3222bb86e8e
parent035e6ccd1153424690a8498911f2f50abcec9942 (diff)
parentba9c42c7594aec80a819b774fb2cf0635cf3aa5a (diff)
downloadpyramid-5a49b5537916ad28a70776ab8728b6e885d8a188.tar.gz
pyramid-5a49b5537916ad28a70776ab8728b6e885d8a188.tar.bz2
pyramid-5a49b5537916ad28a70776ab8728b6e885d8a188.zip
Merge pull request #1989 from stevepiercy/master
strip trailing whitespace
-rw-r--r--docs/narr/assets.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/narr/assets.rst b/docs/narr/assets.rst
index 4c0013298..020794062 100644
--- a/docs/narr/assets.rst
+++ b/docs/narr/assets.rst
@@ -30,7 +30,7 @@ The use of assets is quite common in most web development projects. For
example, when you create a :app:`Pyramid` application using one of the
available scaffolds, as described in :ref:`creating_a_project`, the directory
representing the application contains a Python :term:`package`. Within that
-Python package, there are directories full of files which are static assets.
+Python package, there are directories full of files which are static assets.
For example, there's a ``static`` directory which contains ``.css``, ``.js``,
and ``.gif`` files. These asset files are delivered when a user visits an
application URL.
@@ -123,7 +123,7 @@ The ``name`` represents a URL *prefix*. In order for files that live in the
``path`` directory to be served, a URL that requests one of them must begin
with that prefix. In the example above, ``name`` is ``static`` and ``path`` is
``/var/www/static``. In English this means that you wish to serve the files
-that live in ``/var/www/static`` as sub-URLs of the ``/static`` URL prefix.
+that live in ``/var/www/static`` as sub-URLs of the ``/static`` URL prefix.
Therefore, the file ``/var/www/static/foo.css`` will be returned when the user
visits your application's URL ``/static/foo.css``.
@@ -176,7 +176,7 @@ For example, :meth:`~pyramid.config.Configurator.add_static_view` may be fed a
:linenos:
# config is an instance of pyramid.config.Configurator
- config.add_static_view(name='http://example.com/images',
+ config.add_static_view(name='http://example.com/images',
path='mypackage:images')
Because :meth:`~pyramid.config.Configurator.add_static_view` is provided with a
@@ -256,7 +256,7 @@ a *URL* instead of a view name. For example, the ``name`` argument may be
.. code-block:: python
:linenos:
- config.add_static_view(name='http://example.com/images',
+ config.add_static_view(name='http://example.com/images',
path='mypackage:images')
Under such a configuration, the URL generated by ``static_url`` for assets
@@ -391,7 +391,7 @@ URL. Supplying the ``cachebust`` argument also causes the static view to set
headers instructing clients to cache the asset for ten years, unless the
``cache_max_age`` argument is also passed, in which case that value is used.
-.. note::
+.. note::
md5 checksums are cached in RAM, so if you change a static resource without
restarting your application, you may still generate URLs with a stale md5
@@ -472,7 +472,7 @@ the hash of the currently checked out code:
def tokenize(self, pathspec):
return self.sha1
-
+
Choosing a Cache Buster
~~~~~~~~~~~~~~~~~~~~~~~
@@ -504,7 +504,7 @@ time at start up as a cachebust token:
from pyramid.static import QueryStringConstantCacheBuster
config.add_static_view(
- name='http://mycdn.example.com/',
+ name='http://mycdn.example.com/',
path='mypackage:static',
cachebust=QueryStringConstantCacheBuster(str(time.time())))