Ticket #1627: typos-magic-removal.diff
File typos-magic-removal.diff, 3.9 KB (added by , 19 years ago) |
---|
-
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/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: -
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 ###########################################################