# Whether the framework should propagate raw exceptions rather than catching
-# them. This is useful under some testing si
utations and should never be used
+# them. This is useful under some testing sitations and should never be used
DEBUG_PROPAGATE_EXCEPTIONS = False
# Boolean that sets whether to add thousand separator when formatting numbers
USE_THOUSAND_SEPARATOR = False
-# Number of digits that will be together, when spliting them by
+# Number of digits that will be together, when spliting them by
# THOUSAND_SEPARATOR. 0 means no grouping, 3 means splitting by thousands...
-# Class to use as messges backend
+# Class to use as messges backend
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
# Default values of MESSAGE_LEVEL and MESSAGE_TAGS are defined within
op = op(self.geom_func_prefix, value)
elif lookup_type in self.distance_functions and lookup_type != 'dwithin':
if not field.geography and field.geodetic(self.connection):
- # Geodetic distances are only availble from Points to
+ # Geodetic distances are only availble from Points to
# PointFields on PostGIS 1.4 and below.
if not self.connection.ops.geography:
if field.geom_type != 'POINT':
'contains' : SpatiaLiteFunction('Contains'),
'intersects' : SpatiaLiteFunction('Intersects'),
'relate' : (SpatiaLiteRelate, basestring),
- # Ret
runs true if B's bounding box completely contains A's bounding box.
+ # Retuns true if B's bounding box completely contains A's bounding box.
'contained' : SpatiaLiteFunction('MbrWithin'),
# Returns true if A's bounding box completely contains B's bounding box.
'bbcontains' : SpatiaLiteFunction('MbrContains'),
raise TypeError('Incorrect type of argument: %s' % str(type(args)))
- # Individ
iual parameters passed in.
+ # Individual parameters passed in.
# Thanks to ww for the help
# An x and an y parameter were passed in
return self.expand_to_include((args, args, args, args))
- # Individ
iual parameters passed in.
+ # Individual parameters passed in.
raise OGRException('Incorrect number (%d) of arguments.' % len(args))
thread_context = ThreadLocalIO()
# These module-level routines return the I/O object that is local to the
# the thread. If the I/O object does not exist yet it will be initialized.
+ thread. If the I/O object does not exist yet it will be initialized.
if not thread_context.wkt_r:
thread_context.wkt_r = _WKTReader()
# Getting the degrees and radians per pixel, and the 1/2 the number of
self._degpp.append(z / 360.) # degrees per pixel
- self._radpp.append(z / (2 * pi)) # radians per pixl
+ self._radpp.append(z / (2 * pi)) # radians per pixl
self._npix.append(z / 2) # number of pixels to center of tile
# Multiplying `z` by 2 for the next iteration.
'12.40500 43.94833,12.40889 43.95499,12.41580 43.95795)))')
sm = Country.objects.create(name='San Marino', mpoly=fromstr(wkt))
- # Because floating-point arithm
itic isn't exact, we set a tolerance
+ # Because floating-point arithmtic isn't exact, we set a tolerance
# to pass into GEOS `equals_exact`.
# 0 or 10: last digit is 1
- # in other case, last digi
n is 11 - remainder
+ # in other case, last digi is 11 - remainder
if (not remainder % 10 and check == 1) or \
(remainder == 1 and check == 0) or \
print "Installing indexes ..."
- # Install SQL indic
ies for all newly created models
+ # Install SQL indices for all newly created models
for app_name, model_list in manifest.items():
if model in created_models:
if connection.settings_dict['ENGINE'] == 'django.db.backends.dummy':
# This must be the "dummy" database backend, which means the user
- # hasn't set ENGINE for the databse.
+ # hasn't set ENGINE for the databse.
raise CommandError("Django doesn't know which syntax to use for your SQL statements,\n" +
"because you haven't specified the ENGINE setting for the database.\n" +
"Edit your settings file and change DATBASES['default']['ENGINE'] to something like\n" +
self.data[model] = sorted(instances, key=attrgetter("pk"))
# if possible, bring the models in an order suitable for databases that
- # don't support transactions or cannot defer contraint checks until the
+ # don't support transactions or cannot defer contraint checks until the
return (1, 0) # +infinity, larger than any number
- # Return a list of form.cleaned_data dicts in the order spcified by
+ # Return a list of form.cleaned_data dicts in the order spcified by
return [self.forms[i] for i in self._ordering]
ordered_forms = property(_get_ordered_forms)
if exclude and f.name in exclude:
if isinstance(f, ManyToManyField):
- # If the object doesn't have a primry key yet, just use an empty
+ # If the object doesn't have a primry key yet, just use an empty
# list for its m2m fields. Calling f.value_from_object will raise
# Exclude empty fields that are not required by the form, if the
# underlying model field is required. This keeps the model field
# from raising a required error. Note: don't exclude the field from
- # validaton if the model field allows blanks. If it does, the blank
+ # validaton if the model field allows blanks. If it does, the blank
# value may be included in a unique check, so cannot be excluded
if not self._upload_handlers:
- # If thre are no upload handlers defined, initialize them from settings.
+ # If thre are no upload handlers defined, initialize them from settings.
- # MSIE have issues with gzipped respon
es of various content types.
+ # MSIE have issues with gzipped respons of various content types.
if "msie" in request.META.get('HTTP_USER_AGENT', '').lower():
ctype = response.get('Content-Type', '').lower()
^ (?P<msg> \w+ .*) # a line *starts* with alphanum.
""", re.VERBOSE | re.MULTILINE | re.DOTALL)
- # A callable returning a true value if
f its argument is a blank line
+ # A callable returning a true value if its argument is a blank line
# or contains a single comment.
_IS_BLANK_OR_COMMENT = re.compile(r'^[ ]*(#.*)?$').match
# values_list() is similar to values(), except that the results are
# returned as a list of tuples, rather than a list of dictionaries.
- # Within each tuple, the order of the elemnts is the same as the order
+ # Within each tuple, the order of the elemnts is the same as the order
# of fields in the values_list() call.
from django.db import models
-# All of these models are creatd in the database by Django.
+# All of these models are creatd in the database by Django.
f_a = models.CharField(max_length=10, db_index=True)
# Regression for #10766 - Shouldn't be able to reference an aggregate
- # fields in an
an aggregate() call.
+ # fields in an aggregate() call.
- # The in operator can be used to inspet cache contents
+ # The in operator can be used to inspet cache contents
self.assertEqual("hello2" in self.cache, True)
self.assertEqual("goodbye2" in self.cache, False)
- # Binary strings should be cachable
+ # Binary strings should be cachable
from zlib import compress, decompress
value = 'value_to_be_compressed'
compressed_value = compress(value)
- # allow_future but not allow_empty, next/prev
amust be valid
+ # allow_future but not allow_empty, next/prev must be valid
self.assertEqual(res.context['previous_day'], datetime.date(2008, 10, 1))
self.assertEqual(list(pro.authors.values_list('name', flat=True)), [u'Marty Alchin'])
self.assertEqual(pro.editor.name, u'Marty Alchin')
- # get_or_create is a special case. The get needs to be target
+ # get_or_create is a special case. The get needs to be targeted at
# the write database in order to avoid potential transaction
book, created = Book.objects.get_or_create(title="Pro Django")