mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-27 18:14:48 +00:00
Spelling fixes for contrib section
This commit is contained in:
parent
089f2843f8
commit
4f98523116
5 changed files with 13 additions and 13 deletions
|
|
@ -152,7 +152,7 @@ Let's take the the above BlogIndexPage as an example. We need to register a sign
|
|||
Invalidating individual URLs
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
``wagtail.contrib.wagtailfrontendcache.utils`` provides another utils function called ``purge_url_from_cache``. As the name suggests, this purges an individual URL from the cache.
|
||||
``wagtail.contrib.wagtailfrontendcache.utils`` provides another function called ``purge_url_from_cache``. As the name suggests, this purges an individual URL from the cache.
|
||||
|
||||
For example, this could be useful for purging a single page of blogs:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
.. _routable_page_mixin:
|
||||
|
||||
==============
|
||||
Routable pages
|
||||
==============
|
||||
=====================
|
||||
``RoutablePageMixin``
|
||||
=====================
|
||||
|
||||
The ``RoutablePageMixin`` mixin provides a convenient way for a page to respond on multiple sub-URLs with different views. For example, a blog section on a site might provide several different types of index page at URLs like ``/blog/2013/06/``, ``/blog/authors/bob/``, ``/blog/tagged/python/``, all served by the same page instance.
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ Advanced topics
|
|||
GET parameters
|
||||
--------------
|
||||
|
||||
Pages which require GET parameters (e.g. for pagination) don't generate suitable filenames for generated HTML files.
|
||||
Pages which require GET parameters (e.g. for pagination) don't generate a suitable file name for the generated HTML files.
|
||||
|
||||
Wagtail provides a mixin (``wagtail.contrib.wagtailroutablepage.models.RoutablePageMixin``) which allows you to embed a Django URL configuration into a page. This allows you to give the subpages a URL like ``/page/1/`` which work well with static site generation.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ backends
|
|||
callable
|
||||
callables
|
||||
Cloudflare
|
||||
contrib
|
||||
Django
|
||||
Elasticsearch
|
||||
Embedly
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ def route(pattern, name=None):
|
|||
|
||||
class RoutablePageMixin(object):
|
||||
"""
|
||||
This class can be mixed in to a Page subclass to allow urlconfs to be
|
||||
embedded inside pages.
|
||||
This class can be mixed in to a Page model to allow extra routes to be
|
||||
added to it.
|
||||
"""
|
||||
#: Set this to a tuple of ``django.conf.urls.url`` objects.
|
||||
subpage_urls = None
|
||||
|
|
@ -83,8 +83,7 @@ class RoutablePageMixin(object):
|
|||
|
||||
def reverse_subpage(self, name, args=None, kwargs=None):
|
||||
"""
|
||||
This method does the same job as Djangos' built in
|
||||
"urlresolvers.reverse()" function for subpage urlconfs.
|
||||
This method takes a route name/arguments and returns a URL path.
|
||||
"""
|
||||
args = args or []
|
||||
kwargs = kwargs or {}
|
||||
|
|
@ -93,7 +92,7 @@ class RoutablePageMixin(object):
|
|||
|
||||
def resolve_subpage(self, path):
|
||||
"""
|
||||
This finds a view method/function from a URL path.
|
||||
This method takes a URL path and finds the view to call.
|
||||
"""
|
||||
view, args, kwargs = self.get_resolver().resolve(path)
|
||||
|
||||
|
|
@ -110,7 +109,7 @@ class RoutablePageMixin(object):
|
|||
|
||||
def route(self, request, path_components):
|
||||
"""
|
||||
This hooks the subpage urls into Wagtails routing.
|
||||
This hooks the subpage URLs into Wagtails routing.
|
||||
"""
|
||||
if self.live:
|
||||
try:
|
||||
|
|
@ -135,8 +134,8 @@ class RoutablePageMixin(object):
|
|||
|
||||
class RoutablePage(RoutablePageMixin, Page):
|
||||
"""
|
||||
This class extends Page by adding methods to allow urlconfs
|
||||
to be embedded inside pages
|
||||
This class extends Page by adding methods to allow extra routes to be
|
||||
added to it.
|
||||
"""
|
||||
|
||||
is_abstract = True
|
||||
|
|
|
|||
Loading…
Reference in a new issue