Normalized spelling of "lowercase" and "lowercased".

This commit is contained in:
Jon Dufresne 2018-09-25 07:30:18 -07:00 committed by Tim Graham
parent abeed587b1
commit 8c3e0eb1c1
15 changed files with 34 additions and 34 deletions

View File

@ -44,7 +44,7 @@ class AppConfig:
# None if the application doesn't have a models module.
self.models_module = None
# Mapping of lower case model names to model classes. Initially set to
# Mapping of lowercase model names to model classes. Initially set to
# None to prevent accidental access before import_models() runs.
self.models = None

View File

@ -356,8 +356,8 @@ class AdminUUIDInputWidget(forms.TextInput):
super().__init__(attrs={'class': 'vUUIDField', **(attrs or {})})
# Mapping of lower case language codes [returned by Django's get_language()]
# to language codes supported by select2.
# Mapping of lowercase language codes [returned by Django's get_language()] to
# language codes supported by select2.
# See django/contrib/admin/static/admin/js/vendor/select2/i18n/*
SELECT2_TRANSLATIONS = {x.lower(): x for x in [
'ar', 'az', 'bg', 'ca', 'cs', 'da', 'de', 'el', 'en', 'es', 'et',

View File

@ -59,7 +59,7 @@ class GeoFeedMixin:
raise ValueError('Cannot use simple GeoRSS box in W3C Geo feeds.')
handler.addQuickElement('georss:box', self.georss_coords(box_coords))
else:
# Getting the lower-case geometry type.
# Getting the lowercase geometry type.
gtype = str(geom.geom_type).lower()
if gtype == 'point':
self.add_georss_point(handler, geom.coords, w3c_geo=w3c_geo)

View File

@ -26,7 +26,7 @@ class OGRGeomType:
6 + wkb25bit: 'MultiPolygon25D',
7 + wkb25bit: 'GeometryCollection25D',
}
# Reverse type dictionary, keyed by lower-case of the name.
# Reverse type dictionary, keyed by lowercase of the name.
_str_types = {v.lower(): k for k, v in _types.items()}
def __init__(self, type_input):

View File

@ -149,10 +149,10 @@ class ForeignObjectRel(FieldCacheMixin):
def get_accessor_name(self, model=None):
# This method encapsulates the logic that decides what name to give an
# accessor descriptor that retrieves related many-to-one or
# many-to-many objects. It uses the lower-cased object_name + "_set",
# but this can be overridden with the "related_name" option.
# Due to backwards compatibility ModelForms need to be able to provide
# an alternate model. See BaseInlineFormSet.get_default_prefix().
# many-to-many objects. It uses the lowercased object_name + "_set",
# but this can be overridden with the "related_name" option. Due to
# backwards compatibility ModelForms need to be able to provide an
# alternate model. See BaseInlineFormSet.get_default_prefix().
opts = model._meta if model else self.related_model._meta
model = model or self.related_model
if self.multiple:

View File

@ -538,7 +538,7 @@ def split_domain_port(host):
"""
Return a (domain, port) tuple from a given host.
Returned domain is lower-cased. If the host is invalid, the domain will be
Returned domain is lowercased. If the host is invalid, the domain will be
empty.
"""
host = host.lower()
@ -566,7 +566,7 @@ def validate_host(host, allowed_hosts):
``example.com`` and any subdomain), ``*`` matches anything, and anything
else must match exactly.
Note: This function assumes that the given host is lower-cased and has
Note: This function assumes that the given host is lowercased and has
already had the port, if any, stripped off.
Return ``True`` for a valid host, ``False`` otherwise.

View File

@ -36,7 +36,7 @@ class HttpResponseBase:
status_code = 200
def __init__(self, content_type=None, status=None, reason=None, charset=None):
# _headers is a mapping of the lower-case name to the original case of
# _headers is a mapping of the lowercase name to the original case of
# the header (required for working with legacy systems) and the header
# value. Both the name of the header and its value are ASCII strings.
self._headers = {}

View File

@ -413,7 +413,7 @@ def slugify(value, allow_unicode=False):
def camel_case_to_spaces(value):
"""
Split CamelCase and convert to lower case. Strip surrounding whitespace.
Split CamelCase and convert to lowercase. Strip surrounding whitespace.
"""
return re_camel_case.sub(r' \1', value).strip().lower()

View File

@ -112,7 +112,7 @@ Imports
imports for other Django components and relative imports for local components.
* On each line, alphabetize the items with the upper case items grouped before
the lower case items.
the lowercase items.
* Break long lines using parentheses and indent continuation lines by 4 spaces.
Include a trailing comma after the last import and put the closing

View File

@ -1678,9 +1678,9 @@ related. This works exactly the same as it does for :class:`ForeignKey`,
including all the options regarding :ref:`recursive <recursive-relationships>`
and :ref:`lazy <lazy-relationships>` relationships.
If you do not specify the :attr:`~ForeignKey.related_name` argument for
the ``OneToOneField``, Django will use the lower-case name of the current model
as default value.
If you do not specify the :attr:`~ForeignKey.related_name` argument for the
``OneToOneField``, Django will use the lowercase name of the current model as
default value.
With the following example::

View File

@ -37,8 +37,8 @@ a model object and return its URL. This is a way of inserting or overriding
'news.story': lambda o: "/stories/%s/%s/" % (o.pub_year, o.slug),
}
Note that the model name used in this setting should be all lower-case, regardless
of the case of the actual model class name.
The model name used in this setting should be all lowercase, regardless of the
case of the actual model class name.
.. setting:: ADMINS

View File

@ -172,9 +172,9 @@ they're dealing with publishers here.
Well, if you're dealing with a model object, this is already done for you. When
you are dealing with an object or queryset, Django is able to populate the
context using the lower cased version of the model class' name. This is
provided in addition to the default ``object_list`` entry, but contains exactly
the same data, i.e. ``publisher_list``.
context using the lowercased version of the model class' name. This is provided
in addition to the default ``object_list`` entry, but contains exactly the same
data, i.e. ``publisher_list``.
If this still isn't a good match, you can manually set the name of the
context variable. The ``context_object_name`` attribute on a generic view

View File

@ -981,11 +981,11 @@ To work around this problem, when you are using
class (only), part of the value should contain ``'%(app_label)s'`` and
``'%(class)s'``.
- ``'%(class)s'`` is replaced by the lower-cased name of the child class
that the field is used in.
- ``'%(app_label)s'`` is replaced by the lower-cased name of the app the child
class is contained within. Each installed application name must be unique
and the model class names within each app must also be unique, therefore the
- ``'%(class)s'`` is replaced by the lowercased name of the child class that
the field is used in.
- ``'%(app_label)s'`` is replaced by the lowercased name of the app the child
class is contained within. Each installed application name must be unique and
the model class names within each app must also be unique, therefore the
resulting name will end up being different.
For example, given an app ``common/models.py``::
@ -1065,8 +1065,8 @@ possible::
>>> Restaurant.objects.filter(name="Bob's Cafe")
If you have a ``Place`` that is also a ``Restaurant``, you can get from the
``Place`` object to the ``Restaurant`` object by using the lower-case version
of the model name::
``Place`` object to the ``Restaurant`` object by using the lowercase version of
the model name::
>>> p = Place.objects.get(id=12)
# If p is a Restaurant object, this will give the child class:

View File

@ -67,14 +67,14 @@ Here are some other terms that will help us to handle a common language:
A locale name, either a language specification of the form ``ll`` or a
combined language and country specification of the form ``ll_CC``.
Examples: ``it``, ``de_AT``, ``es``, ``pt_BR``. The language part is
always in lower case and the country part in upper case. The separator
is an underscore.
always in lowercase and the country part in upper case. The separator is
an underscore.
language code
Represents the name of a language. Browsers send the names of the
languages they accept in the ``Accept-Language`` HTTP header using this
format. Examples: ``it``, ``de-at``, ``es``, ``pt-br``. Language codes
are generally represented in lower-case, but the HTTP ``Accept-Language``
are generally represented in lowercase, but the HTTP ``Accept-Language``
header is case-insensitive. The separator is a dash.
message file

View File

@ -44,8 +44,8 @@ class District(models.Model):
# If ticket #1578 ever slips back in, these models will not be able to be
# created (the field names being lower-cased versions of their opposite
# classes is important here).
# created (the field names being lowercased versions of their opposite classes
# is important here).
class First(models.Model):
second = models.IntegerField()