kopia lustrzana https://github.com/wagtail/wagtail
Fix various user-facing and non-user-facing typos
- Found via `codespell -q 3 -S *.po,*.js`pull/8381/head
rodzic
c877bf9886
commit
5c894345b9
|
@ -592,6 +592,7 @@ Contributors
|
|||
* Vaibhav Shukla
|
||||
* Rishank Kanaparti
|
||||
* Daniel Kirkham
|
||||
* Luz Paz
|
||||
|
||||
Translators
|
||||
===========
|
||||
|
|
|
@ -60,7 +60,7 @@ Wagtail follows :doc:`Django's conventions for managing uploaded files <django:t
|
|||
|
||||
When using ``FileSystemStorage``, image urls are constructed starting from the path specified by the ``MEDIA_URL``. In most cases, you should configure your web server to serve image files directly (without passing through Django/Wagtail). When using one of the cloud storage backends, images urls go directly to the cloud storage file url. If you would like to serve your images from a separate asset server or CDN, you can :ref:`configure the image serve view <image_serve_view_redirect_action>` to redirect instead.
|
||||
|
||||
Document serving is controlled by the :ref:`WAGTAILDOCS_SERVE_METHOD <wagtaildocs_serve_method>` method. When using ``FileSystemStorage``, documents are stored in a ``documents`` subdirectory within your site's ``MEDIA_ROOT``. If all your documents are public, you can set the ``WAGTAILDOCS_SERVE_METHOD`` to ``direct`` and configure your web server to serve the files itself. However, if you use Wagtail's :ref:`Collection Privacy settings <collection_privacy_settings>` to restrict access to some or all of your documents, you may or may not want to configure your web server to serve the documents directly. The default setting is ``redirect`` which allows Wagtail to perform any configured privacy checks before offloading serving the actual document to your web server or CDN. This means that wagtail constructs document links that pass through Wagtail, but the final url in the user's browser is served directly by your web server. If a user bookmarks this url, they will be able to access the file without passing through Wagtail's privacy checks. If this is not acceptable, you may want to set the ``WAGTAILDOCS_SERVE_METHOD`` to ``serve_view`` and configure your web server so it will not serve document files itself. If you are serving documents from the cloud and need to enforce privacy settings, you should make sure the documents are not publically accessible using the cloud service's file url.
|
||||
Document serving is controlled by the :ref:`WAGTAILDOCS_SERVE_METHOD <wagtaildocs_serve_method>` method. When using ``FileSystemStorage``, documents are stored in a ``documents`` subdirectory within your site's ``MEDIA_ROOT``. If all your documents are public, you can set the ``WAGTAILDOCS_SERVE_METHOD`` to ``direct`` and configure your web server to serve the files itself. However, if you use Wagtail's :ref:`Collection Privacy settings <collection_privacy_settings>` to restrict access to some or all of your documents, you may or may not want to configure your web server to serve the documents directly. The default setting is ``redirect`` which allows Wagtail to perform any configured privacy checks before offloading serving the actual document to your web server or CDN. This means that Wagtail constructs document links that pass through Wagtail, but the final url in the user's browser is served directly by your web server. If a user bookmarks this url, they will be able to access the file without passing through Wagtail's privacy checks. If this is not acceptable, you may want to set the ``WAGTAILDOCS_SERVE_METHOD`` to ``serve_view`` and configure your web server so it will not serve document files itself. If you are serving documents from the cloud and need to enforce privacy settings, you should make sure the documents are not publicly accessible using the cloud service's file url.
|
||||
|
||||
Cloud storage
|
||||
+++++++++++++
|
||||
|
|
|
@ -5,7 +5,7 @@ By default `wagtail.contrib.forms.models.FormPage` success responses don't do th
|
|||
|
||||
Instead of rendering the `render_landing_page` content in the POST response, we will redirect to a `route` of the `FormPage` instance at a child URL path.
|
||||
The content will still be managed within the same form page's admin.
|
||||
This approach uses the additonal contrib module `wagtail.contrib.routable_page`.
|
||||
This approach uses the additional contrib module `wagtail.contrib.routable_page`.
|
||||
|
||||
An alternative approach is to redirect to an entirely different page, which does not require the `routable_page` module.
|
||||
See [](form_builder_custom_landing_page_redirect).
|
||||
|
|
|
@ -169,7 +169,7 @@ class TestCollectionsIndexView(CollectionInstanceTestUtils, TestCase, WagtailTes
|
|||
self.assertNotContains(response, "Add a collection")
|
||||
|
||||
def test_marketing_user_with_add_permission_on_root(self):
|
||||
# Grant the marketing group permission to add to root colection
|
||||
# Grant the marketing group permission to add to root collection
|
||||
GroupCollectionPermission.objects.create(
|
||||
group=self.marketing_group,
|
||||
collection=self.root_collection,
|
||||
|
|
|
@ -1145,7 +1145,7 @@ class TestChildRelationComparison(TestCase):
|
|||
objs_a, objs_b
|
||||
)
|
||||
self.assertEqual(map_forwards, {0: 1}) # Map Father Christmas to Father Ted
|
||||
self.assertEqual(map_backwards, {1: 0}) # Map Father Ted ot Father Christmas
|
||||
self.assertEqual(map_backwards, {1: 0}) # Map Father Ted to Father Christmas
|
||||
self.assertEqual(added, [0]) # Add Santa Claus
|
||||
self.assertEqual(deleted, [])
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ def _page_urls_for_sites(
|
|||
|
||||
# use a `HttpRequest` to influence the return value
|
||||
request = get_dummy_request(site=site)
|
||||
# resuse cached site root paths if available
|
||||
# reuse cached site root paths if available
|
||||
if hasattr(cache_target, "_wagtail_cached_site_root_paths"):
|
||||
request._wagtail_cached_site_root_paths = (
|
||||
cache_target._wagtail_cached_site_root_paths
|
||||
|
|
|
@ -839,7 +839,7 @@ class TestMultipleDocumentUploader(TestCase, WagtailTestUtils):
|
|||
|
||||
def test_add_post_with_title(self):
|
||||
"""
|
||||
This tests that a POST request to the add view saves the document with a suplied title and returns an edit form
|
||||
This tests that a POST request to the add view saves the document with a supplied title and returns an edit form
|
||||
"""
|
||||
response = self.client.post(
|
||||
reverse("wagtaildocs:add_multiple"),
|
||||
|
@ -1169,7 +1169,7 @@ class TestMultipleCustomDocumentUploaderWithRequiredField(TestMultipleDocumentUp
|
|||
|
||||
def test_add_post_with_title(self):
|
||||
"""
|
||||
This tests that a POST request to the add view saves the document with a suplied title and returns an edit form
|
||||
This tests that a POST request to the add view saves the document with a supplied title and returns an edit form
|
||||
"""
|
||||
response = self.client.post(
|
||||
reverse("wagtaildocs:add_multiple"),
|
||||
|
|
|
@ -418,7 +418,7 @@ class AbstractImage(ImageFileMixin, CollectionMember, index.Indexed, models.Mode
|
|||
*If using custom image models, an instance of the custom rendition
|
||||
model will be returned.
|
||||
"""
|
||||
# Because of unique contraints applied to the model, we use
|
||||
# Because of unique constraints applied to the model, we use
|
||||
# get_or_create() to guard against race conditions
|
||||
rendition, created = self.renditions.get_or_create(
|
||||
filter_spec=filter.spec,
|
||||
|
|
|
@ -1840,7 +1840,7 @@ class Page(AbstractPage, index.Indexed, ClusterableModel, metaclass=PageBase):
|
|||
|
||||
.. note::
|
||||
|
||||
Redirect paths are 'normalized' to apply consistant ordering to GET parameters,
|
||||
Redirect paths are 'normalized' to apply consistent ordering to GET parameters,
|
||||
so you don't need to include every variation. Fragment identifiers are discarded
|
||||
too, so should be avoided.
|
||||
"""
|
||||
|
|
|
@ -244,7 +244,7 @@ class MatchExpression(Expression):
|
|||
compiled_query = compiler.compile(self.query) # Compile the query to a string
|
||||
formatted_query = compiled_query[0] % tuple(
|
||||
compiled_query[1]
|
||||
) # Subsitute the params in the query
|
||||
) # Substitute the params in the query
|
||||
column_list = ", ".join(
|
||||
["`{}`".format(column) for column in self.columns]
|
||||
) # ['title', 'body'] becomes '`title`, `body`'
|
||||
|
|
|
@ -189,7 +189,7 @@ class MatchExpression(Expression):
|
|||
compiled_query = compiler.compile(self.query) # Compile the query to a string
|
||||
formatted_query = compiled_query[0] % tuple(
|
||||
compiled_query[1]
|
||||
) # Subsitute the params in the query
|
||||
) # Substitute the params in the query
|
||||
params = [
|
||||
"{{{column}}} : ({query})".format(
|
||||
column=joined_columns, query=formatted_query
|
||||
|
|
|
@ -192,7 +192,7 @@ class Migration(migrations.Migration):
|
|||
)
|
||||
)
|
||||
|
||||
# We also need to create a joint index on 'title' and 'body', to be able to query both at the same time. If we don't have this, some queries may return wrong results. For example, if we match 'A AND (NOT B)' against 'A, B', it returns false, but if we do (match 'A AND (NOT B)' against 'A') or (match 'A AND (NOT B)' against 'B'), the first one would return True, and the whole expression would be True (wrong result). That's the same as saying that testing subsets does not neccessarily produce the same result as testing the whole set.
|
||||
# We also need to create a joint index on 'title' and 'body', to be able to query both at the same time. If we don't have this, some queries may return wrong results. For example, if we match 'A AND (NOT B)' against 'A, B', it returns false, but if we do (match 'A AND (NOT B)' against 'A') or (match 'A AND (NOT B)' against 'B'), the first one would return True, and the whole expression would be True (wrong result). That's the same as saying that testing subsets does not necessarily produce the same result as testing the whole set.
|
||||
operations.append(
|
||||
migrations.RunSQL(
|
||||
sql="""
|
||||
|
|
|
@ -16,7 +16,7 @@ def balanced_reduce(operator, seq, initializer=NOT_SET):
|
|||
"""
|
||||
Has the same result as Python's reduce function, but performs the calculations in a different order.
|
||||
|
||||
This is important when the operator is constructing data structures such as search query clases.
|
||||
This is important when the operator is constructing data structures such as search query classes.
|
||||
This method will make the resulting data structures flatter, so operations that need to traverse
|
||||
them don't end up crashing with recursion errors.
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue