Fixed typos in comments and docs.

This commit is contained in:
Min ho Kim 2019-07-02 17:36:17 +10:00 committed by Mariusz Felisiak
parent 090ca6512f
commit fbb83fefd4
7 changed files with 7 additions and 7 deletions

View File

@ -31,7 +31,7 @@ class RenameContentType(migrations.RunPython):
# asking the user what should be done next. # asking the user what should be done next.
content_type.model = old_model content_type.model = old_model
else: else:
# Clear the cache as the `get_by_natual_key()` call will cache # Clear the cache as the `get_by_natural_key()` call will cache
# the renamed ContentType instance by its old model name. # the renamed ContentType instance by its old model name.
ContentType.objects.clear_cache() ContentType.objects.clear_cache()

View File

@ -397,7 +397,7 @@ class BaseDatabaseWrapper:
The usual way to start a transaction is to turn autocommit off. The usual way to start a transaction is to turn autocommit off.
SQLite does not properly start a transaction when disabling SQLite does not properly start a transaction when disabling
autocommit. To avoid this buggy behavior and to actually enter a new autocommit. To avoid this buggy behavior and to actually enter a new
transaction, an explcit BEGIN is required. Using transaction, an explicit BEGIN is required. Using
force_begin_transaction_with_broken_autocommit=True will issue an force_begin_transaction_with_broken_autocommit=True will issue an
explicit BEGIN with SQLite. This option will be ignored for other explicit BEGIN with SQLite. This option will be ignored for other
backends. backends.

View File

@ -274,7 +274,7 @@ def urlize(text, trim_url_limit=None, nofollow=False, autoescape=False):
trail = closing + trail trail = closing + trail
trimmed_something = True trimmed_something = True
# Trim trailing punctuation (after trimming wrapping punctuation, # Trim trailing punctuation (after trimming wrapping punctuation,
# as encoded entities contain ';'). Unescape entites to avoid # as encoded entities contain ';'). Unescape entities to avoid
# breaking them by removing ';'. # breaking them by removing ';'.
middle_unescaped = html.unescape(middle) middle_unescaped = html.unescape(middle)
stripped = middle_unescaped.rstrip(TRAILING_PUNCTUATION_CHARS) stripped = middle_unescaped.rstrip(TRAILING_PUNCTUATION_CHARS)

View File

@ -406,7 +406,7 @@ The following checks are run if you use the :option:`check --deploy` option:
* **security.W017**: :setting:`CSRF_COOKIE_HTTPONLY` is not set to ``True``. * **security.W017**: :setting:`CSRF_COOKIE_HTTPONLY` is not set to ``True``.
Using an ``HttpOnly`` CSRF cookie makes it more difficult for cross-site Using an ``HttpOnly`` CSRF cookie makes it more difficult for cross-site
scripting attacks to steal the CSRF token. *This check is removed in Django scripting attacks to steal the CSRF token. *This check is removed in Django
1.11 as the* :setting:`CSRF_COOKIE_HTTPONLY` *setting offers no pratical 1.11 as the* :setting:`CSRF_COOKIE_HTTPONLY` *setting offers no practical
benefit.* benefit.*
* **security.W018**: You should not have :setting:`DEBUG` set to ``True`` in * **security.W018**: You should not have :setting:`DEBUG` set to ``True`` in
deployment. deployment.

View File

@ -2308,7 +2308,7 @@ QUnit.config.testId = [].concat( urlParams.testId || [] );
// Exact case-insensitive match of the module name // Exact case-insensitive match of the module name
QUnit.config.module = urlParams.module; QUnit.config.module = urlParams.module;
// Regular expression or case-insenstive substring match against "moduleName: testName" // Regular expression or case-insensitive substring match against "moduleName: testName"
QUnit.config.filter = urlParams.filter; QUnit.config.filter = urlParams.filter;
// Test order randomization // Test order randomization

View File

@ -4090,7 +4090,7 @@ class AdminInlineTests(TestCase):
response = self.client.post(collector_url, self.post_data) response = self.client.post(collector_url, self.post_data)
self.assertEqual(response.status_code, 302) self.assertEqual(response.status_code, 302)
self.assertEqual(Widget.objects.count(), 0) self.assertEqual(Widget.objects.count(), 0)
# But after adding the permisson it can. # But after adding the permission it can.
permissionuser.user_permissions.add(get_perm(Widget, get_permission_codename('add', Widget._meta))) permissionuser.user_permissions.add(get_perm(Widget, get_permission_codename('add', Widget._meta)))
self.post_data['widget_set-0-name'] = "Widget 1" self.post_data['widget_set-0-name'] = "Widget 1"
collector_url = reverse('admin:admin_views_collector_change', args=(self.collector.pk,)) collector_url = reverse('admin:admin_views_collector_change', args=(self.collector.pk,))

View File

@ -1677,7 +1677,7 @@ class UnprefixedDefaultLanguageTests(SimpleTestCase):
def test_no_redirect_on_404(self): def test_no_redirect_on_404(self):
""" """
A request for a nonexistent URL shouldn't cause a redirect to A request for a nonexistent URL shouldn't cause a redirect to
/<defaut_language>/<request_url> when prefix_default_language=False and /<default_language>/<request_url> when prefix_default_language=False and
/<default_language>/<request_url> has a URL match (#27402). /<default_language>/<request_url> has a URL match (#27402).
""" """
# A match for /group1/group2/ must exist for this to act as a # A match for /group1/group2/ must exist for this to act as a