Ticket #1627: typos.diff
File typos.diff, 9.8 KB (added by , 19 years ago) |
---|
-
django/db/models/manipulators.py
260 260 if self.opts.one_to_one_field: 261 261 # Sanity check -- Make sure the "parent" object exists. 262 262 # For example, make sure the Place exists for the Restaurant. 263 # Let the ObjectDoesNotExist exception prop ogate up.263 # Let the ObjectDoesNotExist exception propagate up. 264 264 lookup_kwargs = self.opts.one_to_one_field.rel.limit_choices_to 265 265 lookup_kwargs['%s__exact' % self.opts.one_to_one_field.rel.field_name] = obj_key 266 266 self.opts.one_to_one_field.rel.to.get_model_module().get(**lookup_kwargs) -
django/db/models/fields/__init__.py
41 41 42 42 # A guide to Field parameters: 43 43 # 44 # * name: The name of the field specif ed in the model.44 # * name: The name of the field specified in the model. 45 45 # * attname: The attribute to use on the model object. This is the same as 46 46 # "name", except in the case of ForeignKeys, where "_id" is 47 47 # appended. -
django/db/models/query.py
268 268 """ 269 269 assert kind in ("month", "year", "day"), "'kind' must be one of 'year', 'month' or 'day'." 270 270 assert order in ('ASC', 'DESC'), "'order' must be either 'ASC' or 'DESC'." 271 # Let the FieldDoesNotExist exception prop ogate.271 # Let the FieldDoesNotExist exception propagate. 272 272 field = self.model._meta.get_field(field_name, many_to_many=False) 273 273 assert isinstance(field, DateField), "%r isn't a DateField." % field_name 274 274 return self._clone(klass=DateQuerySet, _field=field, _kind=kind, _order=order) -
django/core/servers/basehttp.py
46 46 raise StopIteration 47 47 48 48 # Regular expression that matches `special' characters in parameters, the 49 # exist ance of which force quoting of the parameter value.49 # existence of which force quoting of the parameter value. 50 50 tspecials = re.compile(r'[ \(\)<>@,;:\\"/\[\]\?=]') 51 51 52 52 def _formatparam(param, value=None, quote=1): -
django/core/management.py
119 119 # but don't exist physically 120 120 not_installed_models = set(pending_references.keys()) 121 121 if not_installed_models: 122 final_output.append('-- The following references should be added but depend on non-exist ant tables:')122 final_output.append('-- The following references should be added but depend on non-existent tables:') 123 123 for klass in not_installed_models: 124 124 final_output.extend(['-- ' + sql for sql in 125 125 _get_sql_for_pending_references(klass, pending_references)]) … … 247 247 from django.db import backend, connection, models, get_introspection_module 248 248 introspection = get_introspection_module() 249 249 250 # This should work even if a connect on isn't available250 # This should work even if a connection isn't available 251 251 try: 252 252 cursor = connection.cursor() 253 253 except: -
django/utils/_threading_local.py
149 149 raise TypeError("Initialization arguments are not supported") 150 150 151 151 # We need to create the thread dict in anticipation of 152 # __init__ being called, to make s ire we don't cal it152 # __init__ being called, to make sure we don't call it 153 153 # again ourselves. 154 154 dict = object.__getattribute__(self, '__dict__') 155 155 currentThread().__dict__[key] = dict -
django/contrib/admin/templatetags/admin_list.py
80 80 if field_name == '__str__': 81 81 header = lookup_opts.verbose_name 82 82 else: 83 attr = getattr(cl.model, field_name) # Let AttributeErrors prop ogate.83 attr = getattr(cl.model, field_name) # Let AttributeErrors propagate. 84 84 try: 85 85 header = attr.short_description 86 86 except AttributeError: -
tests/modeltests/basic/models.py
330 330 331 331 API_TESTS += """ 332 332 333 # You can manually specify the primary key when creating a new obje t333 # You can manually specify the primary key when creating a new object 334 334 >>> a101 = Article(id=101, headline='Article 101', pub_date=datetime(2005, 7, 31, 12, 30, 45)) 335 335 >>> a101.save() 336 336 >>> a101 = Article.objects.get(pk=101) -
tests/modeltests/transactions/models.py
36 36 [Alice Smith] 37 37 38 38 # the autocommit decorator works exactly the same as the default behavior 39 >>> autocom itted_create_then_fail = transaction.autocommit(create_a_reporter_then_fail)40 >>> autocom itted_create_then_fail("Ben", "Jones")39 >>> autocommitted_create_then_fail = transaction.autocommit(create_a_reporter_then_fail) 40 >>> autocommitted_create_then_fail("Ben", "Jones") 41 41 Traceback (most recent call last): 42 42 ... 43 43 Exception: I meant to do that … … 46 46 >>> Reporter.objects.all() 47 47 [Alice Smith, Ben Jones] 48 48 49 # With the commit_on_success decorator, the transaction is only com itted if the49 # With the commit_on_success decorator, the transaction is only committed if the 50 50 # function doesn't throw an exception 51 51 >>> committed_on_success = transaction.commit_on_success(create_a_reporter_then_fail) 52 52 >>> committed_on_success("Carol", "Doe") … … 63 63 ... r = Reporter.objects.get(first_name="Alice") 64 64 ... r.delete() 65 65 ... 66 >>> remove_com itted_on_success = transaction.commit_on_success(remove_a_reporter)67 >>> remove_com itted_on_success()66 >>> remove_committed_on_success = transaction.commit_on_success(remove_a_reporter) 67 >>> remove_committed_on_success() 68 68 >>> Reporter.objects.all() 69 69 [Ben Jones] 70 70 … … 89 89 Traceback (most recent call last): 90 90 ... 91 91 TransactionManagementError: Transaction managed block ended with pending COMMIT/ROLLBACK 92 """ 93 No newline at end of file 92 """ -
tests/othertests/templates.py
149 149 'basic-syntax33': (r'1{{ var.method3 }}2', {"var": SomeClass()}, "12"), 150 150 151 151 # In methods that raise an exception without a "silent_variable_attribute" set to True, 152 # the exception prop ogates152 # the exception propagates 153 153 'basic-syntax34': (r'1{{ var.method4 }}2', {"var": SomeClass()}, SomeOtherException), 154 154 155 155 ### COMMENT TAG ########################################################### -
tests/othertests/cache.py
15 15 cache.set("key", "value") 16 16 assert cache.get("key") == "value" 17 17 18 # get with non-exist ant keys18 # get with non-existent keys 19 19 assert cache.get("does not exist") is None 20 20 assert cache.get("does not exist", "bang!") == "bang!" 21 21 … … 57 57 # expiration 58 58 cache.set('expire', 'very quickly', 1) 59 59 time.sleep(2) 60 assert cache.get("expire") == None 61 No newline at end of file 60 assert cache.get("expire") == None -
tests/doctest.py
846 846 if extraglobs is not None: 847 847 globs.update(extraglobs) 848 848 849 # Recursively exp ore `obj`, extracting DocTests.849 # Recursively explore `obj`, extracting DocTests. 850 850 tests = [] 851 851 self._find(tests, obj, name, module, source_lines, globs, {}) 852 852 return tests … … 1210 1210 # Process each example. 1211 1211 for examplenum, example in enumerate(test.examples): 1212 1212 1213 # If REPORT_ONLY_FIRST_FAILURE is set, then sup ress1213 # If REPORT_ONLY_FIRST_FAILURE is set, then suppress 1214 1214 # reporting after the first failure. 1215 1215 quiet = (self.optionflags & REPORT_ONLY_FIRST_FAILURE and 1216 1216 failures > 0) -
docs/modpython.txt
190 190 ============== 191 191 192 192 When you use Apache/mod_python, errors will be caught by Django -- in other 193 words, they won't prop ogate to the Apache level and won't appear in the Apache193 words, they won't propagate to the Apache level and won't appear in the Apache 194 194 ``error_log``. 195 195 196 196 The exception for this is if something is really wonky in your Django setup. In