Fixed typos in docs and comments
This commit is contained in:
parent
b99a4e1073
commit
ee26797cff
|
@ -76,7 +76,7 @@ class OGRGeometry(GDALBase):
|
||||||
|
|
||||||
str_instance = isinstance(geom_input, six.string_types)
|
str_instance = isinstance(geom_input, six.string_types)
|
||||||
|
|
||||||
# If HEX, unpack input to to a binary buffer.
|
# If HEX, unpack input to a binary buffer.
|
||||||
if str_instance and hex_regex.match(geom_input):
|
if str_instance and hex_regex.match(geom_input):
|
||||||
geom_input = memoryview(a2b_hex(geom_input.upper().encode()))
|
geom_input = memoryview(a2b_hex(geom_input.upper().encode()))
|
||||||
str_instance = False
|
str_instance = False
|
||||||
|
|
|
@ -27,7 +27,7 @@ def bin_constructor(func):
|
||||||
|
|
||||||
# HEX & WKB output
|
# HEX & WKB output
|
||||||
def bin_output(func):
|
def bin_output(func):
|
||||||
"Generates a prototype for the routines that return a a sized string."
|
"Generates a prototype for the routines that return a sized string."
|
||||||
func.argtypes = [GEOM_PTR, POINTER(c_size_t)]
|
func.argtypes = [GEOM_PTR, POINTER(c_size_t)]
|
||||||
func.errcheck = check_sized_string
|
func.errcheck = check_sized_string
|
||||||
func.restype = c_uchar_p
|
func.restype = c_uchar_p
|
||||||
|
|
|
@ -24,7 +24,7 @@ def add_srs_entry(srs, auth_name='EPSG', auth_srid=None, ref_sys_name=None,
|
||||||
Defaults to the SRID determined by GDAL.
|
Defaults to the SRID determined by GDAL.
|
||||||
|
|
||||||
ref_sys_name:
|
ref_sys_name:
|
||||||
For SpatiaLite users only, sets the value of the the `ref_sys_name` field.
|
For SpatiaLite users only, sets the value of the `ref_sys_name` field.
|
||||||
Defaults to the name determined by GDAL.
|
Defaults to the name determined by GDAL.
|
||||||
|
|
||||||
database:
|
database:
|
||||||
|
|
|
@ -32,7 +32,7 @@ def serve(request, path, document_root=None, insecure=False, **kwargs):
|
||||||
"""
|
"""
|
||||||
if not settings.DEBUG and not insecure:
|
if not settings.DEBUG and not insecure:
|
||||||
raise ImproperlyConfigured("The staticfiles view can only be used in "
|
raise ImproperlyConfigured("The staticfiles view can only be used in "
|
||||||
"debug mode or if the the --insecure "
|
"debug mode or if the --insecure "
|
||||||
"option of 'runserver' is used")
|
"option of 'runserver' is used")
|
||||||
normalized_path = posixpath.normpath(unquote(path)).lstrip('/')
|
normalized_path = posixpath.normpath(unquote(path)).lstrip('/')
|
||||||
absolute_path = finders.find(normalized_path)
|
absolute_path = finders.find(normalized_path)
|
||||||
|
|
|
@ -1587,7 +1587,7 @@ def prefetch_related_objects(result_cache, related_lookups):
|
||||||
continue
|
continue
|
||||||
done_lookups.add(lookup)
|
done_lookups.add(lookup)
|
||||||
|
|
||||||
# Top level, the list of objects to decorate is the the result cache
|
# Top level, the list of objects to decorate is the result cache
|
||||||
# from the primary QuerySet. It won't be for deeper levels.
|
# from the primary QuerySet. It won't be for deeper levels.
|
||||||
obj_list = result_cache
|
obj_list = result_cache
|
||||||
|
|
||||||
|
|
|
@ -41,10 +41,10 @@ def _get_new_csrf_key():
|
||||||
|
|
||||||
def get_token(request):
|
def get_token(request):
|
||||||
"""
|
"""
|
||||||
Returns the the CSRF token required for a POST form. The token is an
|
Returns the CSRF token required for a POST form. The token is an
|
||||||
alphanumeric value.
|
alphanumeric value.
|
||||||
|
|
||||||
A side effect of calling this function is to make the the csrf_protect
|
A side effect of calling this function is to make the csrf_protect
|
||||||
decorator and the CsrfViewMiddleware add a CSRF cookie and a 'Vary: Cookie'
|
decorator and the CsrfViewMiddleware add a CSRF cookie and a 'Vary: Cookie'
|
||||||
header to the outgoing response. For this reason, you may need to use this
|
header to the outgoing response. For this reason, you may need to use this
|
||||||
function lazily, as is done by the csrf context processor.
|
function lazily, as is done by the csrf context processor.
|
||||||
|
|
|
@ -116,7 +116,7 @@ Practicality beats purity, so it is up to each committer to decide how much
|
||||||
history mangling to do for a pull request. The main points are engaging the
|
history mangling to do for a pull request. The main points are engaging the
|
||||||
community, getting work done, and having a usable commit history.
|
community, getting work done, and having a usable commit history.
|
||||||
|
|
||||||
.. _committing-guidlines:
|
.. _committing-guidelines:
|
||||||
|
|
||||||
Committing guidelines
|
Committing guidelines
|
||||||
---------------------
|
---------------------
|
||||||
|
|
|
@ -81,7 +81,7 @@ commit them::
|
||||||
git commit
|
git commit
|
||||||
|
|
||||||
When writing the commit message, follow the :ref:`commit message
|
When writing the commit message, follow the :ref:`commit message
|
||||||
guidelines <committing-guidlines>` to ease the work of the committer. If
|
guidelines <committing-guidelines>` to ease the work of the committer. If
|
||||||
you're uncomfortable with English, try at least to describe precisely what the
|
you're uncomfortable with English, try at least to describe precisely what the
|
||||||
commit does.
|
commit does.
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ a pull request at GitHub. A good pull request means:
|
||||||
|
|
||||||
* well-formed messages for each commit: a summary line and then paragraphs
|
* well-formed messages for each commit: a summary line and then paragraphs
|
||||||
wrapped at 72 characters thereafter -- see the :ref:`committing guidelines
|
wrapped at 72 characters thereafter -- see the :ref:`committing guidelines
|
||||||
<committing-guidlines>` for more details,
|
<committing-guidelines>` for more details,
|
||||||
|
|
||||||
* documentation and tests, if needed -- actually tests are always needed,
|
* documentation and tests, if needed -- actually tests are always needed,
|
||||||
except for documentation changes.
|
except for documentation changes.
|
||||||
|
|
|
@ -56,7 +56,9 @@ Enjoy the free API
|
||||||
==================
|
==================
|
||||||
|
|
||||||
With that, you've got a free, and rich, :doc:`Python API </topics/db/queries>` to
|
With that, you've got a free, and rich, :doc:`Python API </topics/db/queries>` to
|
||||||
access your data. The API is created on the fly, no code generation necessary::
|
access your data. The API is created on the fly, no code generation necessary:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
# Import the models we created from our "news" app
|
# Import the models we created from our "news" app
|
||||||
>>> from news.models import Reporter, Article
|
>>> from news.models import Reporter, Article
|
||||||
|
|
|
@ -118,7 +118,8 @@ Security fixes
|
||||||
|
|
||||||
If we become aware of a security problem -- hopefully by someone following our
|
If we become aware of a security problem -- hopefully by someone following our
|
||||||
:ref:`security reporting policy <reporting-security-issues>` -- we'll do
|
:ref:`security reporting policy <reporting-security-issues>` -- we'll do
|
||||||
everything necessary to fix it. This might mean breaking backwards compatibility; security trumps the compatibility guarantee.
|
everything necessary to fix it. This might mean breaking backwards
|
||||||
|
compatibility; security trumps the compatibility guarantee.
|
||||||
|
|
||||||
Contributed applications (``django.contrib``)
|
Contributed applications (``django.contrib``)
|
||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
|
|
|
@ -824,7 +824,7 @@ subclass::
|
||||||
added last after all editable fields.
|
added last after all editable fields.
|
||||||
|
|
||||||
A read-only field can not only display data from a model's field, it can
|
A read-only field can not only display data from a model's field, it can
|
||||||
also display the output of a a model's method or a method of the
|
also display the output of a model's method or a method of the
|
||||||
``ModelAdmin`` class itself. This is very similar to the way
|
``ModelAdmin`` class itself. This is very similar to the way
|
||||||
:attr:`ModelAdmin.list_display` behaves. This provides an easy way to use
|
:attr:`ModelAdmin.list_display` behaves. This provides an easy way to use
|
||||||
the admin interface to provide feedback on the status of the objects being
|
the admin interface to provide feedback on the status of the objects being
|
||||||
|
|
|
@ -330,7 +330,7 @@ described above, ``psycopg2`` may be installed using the following command::
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
If you don't have ``pip``, follow the the :ref:`installation instructions
|
If you don't have ``pip``, follow the :ref:`installation instructions
|
||||||
<installing-official-release>` to install it.
|
<installing-official-release>` to install it.
|
||||||
|
|
||||||
.. _fink:
|
.. _fink:
|
||||||
|
|
|
@ -82,7 +82,7 @@ Changing passwords
|
||||||
Django does not store raw (clear text) passwords on the user model, but only
|
Django does not store raw (clear text) passwords on the user model, but only
|
||||||
a hash (see :doc:`documentation of how passwords are managed
|
a hash (see :doc:`documentation of how passwords are managed
|
||||||
</topics/auth/passwords>` for full details). Because of this, do not attempt to
|
</topics/auth/passwords>` for full details). Because of this, do not attempt to
|
||||||
manipulate the password attribute of the user directly. This is why a a helper
|
manipulate the password attribute of the user directly. This is why a helper
|
||||||
function is used when creating a user.
|
function is used when creating a user.
|
||||||
|
|
||||||
To change a user's password, you have several options:
|
To change a user's password, you have several options:
|
||||||
|
|
|
@ -2454,7 +2454,7 @@ class TestCustomChangeList(TestCase):
|
||||||
self.assertEqual(response.status_code, 302) # redirect somewhere
|
self.assertEqual(response.status_code, 302) # redirect somewhere
|
||||||
# Hit the page once to get messages out of the queue message list
|
# Hit the page once to get messages out of the queue message list
|
||||||
response = self.client.get('/test_admin/%s/admin_views/gadget/' % self.urlbit)
|
response = self.client.get('/test_admin/%s/admin_views/gadget/' % self.urlbit)
|
||||||
# Ensure that that data is still not visible on the page
|
# Ensure that data is still not visible on the page
|
||||||
response = self.client.get('/test_admin/%s/admin_views/gadget/' % self.urlbit)
|
response = self.client.get('/test_admin/%s/admin_views/gadget/' % self.urlbit)
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertNotContains(response, 'First Gadget')
|
self.assertNotContains(response, 'First Gadget')
|
||||||
|
|
|
@ -7,7 +7,7 @@ from django.utils.unittest import TestCase
|
||||||
|
|
||||||
#
|
#
|
||||||
# Tests for #9659: wsgi.file_wrapper in the builtin server.
|
# Tests for #9659: wsgi.file_wrapper in the builtin server.
|
||||||
# We need to mock a couple of of handlers and keep track of what
|
# We need to mock a couple of handlers and keep track of what
|
||||||
# gets called when using a couple kinds of WSGI apps.
|
# gets called when using a couple kinds of WSGI apps.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue