diff --git a/django/conf/__init__.py b/django/conf/__init__.py
index d94f6e9..ed1c2fd 100644
a
|
b
|
class Settings(object):
|
102 | 102 | new_installed_apps.append(app) |
103 | 103 | self.INSTALLED_APPS = new_installed_apps |
104 | 104 | |
105 | | if hasattr(time, 'tzset') and getattr(self, 'TIME_ZONE'): |
| 105 | if hasattr(time, 'tzset') and self.TIME_ZONE: |
106 | 106 | # Move the time zone info into os.environ. See ticket #2315 for why |
107 | 107 | # we don't do this unconditionally (breaks Windows). |
108 | 108 | os.environ['TZ'] = self.TIME_ZONE |
diff --git a/django/contrib/admin/validation.py b/django/contrib/admin/validation.py
index bee2891..8d7a8c9 100644
a
|
b
|
def validate_inline(cls, parent, parent_model):
|
170 | 170 | fk = _get_foreign_key(parent_model, cls.model, fk_name=cls.fk_name, can_fail=True) |
171 | 171 | |
172 | 172 | # extra = 3 |
173 | | if not isinstance(getattr(cls, 'extra'), int): |
| 173 | if not isinstance(cls.extra, int): |
174 | 174 | raise ImproperlyConfigured("'%s.extra' should be a integer." |
175 | 175 | % cls.__name__) |
176 | 176 | |
diff --git a/django/contrib/auth/__init__.py b/django/contrib/auth/__init__.py
index 169ae01..a184aea 100644
a
|
b
|
def load_backend(path):
|
20 | 20 | cls = getattr(mod, attr) |
21 | 21 | except AttributeError: |
22 | 22 | raise ImproperlyConfigured('Module "%s" does not define a "%s" authentication backend' % (module, attr)) |
23 | | try: |
24 | | getattr(cls, 'supports_object_permissions') |
25 | | except AttributeError: |
| 23 | if not hasattr(cls, "supports_object_permissions"): |
26 | 24 | warn("Authentication backends without a `supports_object_permissions` attribute are deprecated. Please define it in %s." % cls, |
27 | 25 | PendingDeprecationWarning) |
28 | 26 | cls.supports_object_permissions = False |
29 | | try: |
30 | | getattr(cls, 'supports_anonymous_user') |
31 | | except AttributeError: |
| 27 | |
| 28 | if not hasattr(cls, 'supports_anonymous_user'): |
32 | 29 | warn("Authentication backends without a `supports_anonymous_user` attribute are deprecated. Please define it in %s." % cls, |
33 | 30 | PendingDeprecationWarning) |
34 | 31 | cls.supports_anonymous_user = False |
diff --git a/django/contrib/gis/sitemaps/views.py b/django/contrib/gis/sitemaps/views.py
index f3c1da2..152edc9 100644
a
|
b
|
def kml(request, label, model, field_name=None, compress=False, using=DEFAULT_DB
|
93 | 93 | else: |
94 | 94 | qs = klass._default_manager.using(using).all() |
95 | 95 | for mod in qs: |
96 | | setattr(mod, 'kml', getattr(mod, field_name).kml) |
| 96 | mod.kml = getattr(mod, field_name).kml) |
97 | 97 | placemarks.append(mod) |
98 | 98 | |
99 | 99 | # Getting the render function and rendering to the correct. |
diff --git a/django/core/cache/__init__.py b/django/core/cache/__init__.py
index 1b60290..c3bb0e1 100644
a
|
b
|
def get_cache(backend_uri):
|
63 | 63 | else: |
64 | 64 | name = scheme |
65 | 65 | module = importlib.import_module(name) |
66 | | return getattr(module, 'CacheClass')(host, params) |
| 66 | return module.CacheClass(host, params) |
67 | 67 | |
68 | 68 | cache = get_cache(settings.CACHE_BACKEND) |
69 | 69 | |
diff --git a/django/db/models/base.py b/django/db/models/base.py
index 6304e00..43ecbcc 100644
a
|
b
|
class Model(object):
|
509 | 509 | # autopopulate the _order field |
510 | 510 | field = meta.order_with_respect_to |
511 | 511 | order_value = manager.using(using).filter(**{field.name: getattr(self, field.attname)}).count() |
512 | | setattr(self, '_order', order_value) |
| 512 | self._order = order_value |
513 | 513 | |
514 | 514 | if not pk_set: |
515 | 515 | if force_update: |
diff --git a/django/db/models/options.py b/django/db/models/options.py
index 5d84ab6..5cf911d 100644
a
|
b
|
class Options(object):
|
79 | 79 | # unique_together can be either a tuple of tuples, or a single |
80 | 80 | # tuple of two strings. Normalize it to a tuple of tuples, so that |
81 | 81 | # calling code can uniformly expect that. |
82 | | ut = meta_attrs.pop('unique_together', getattr(self, 'unique_together')) |
| 82 | ut = meta_attrs.pop('unique_together', self.unique_together) |
83 | 83 | if ut and not isinstance(ut[0], (tuple, list)): |
84 | 84 | ut = (ut,) |
85 | | setattr(self, 'unique_together', ut) |
| 85 | self.unique_together = ut |
86 | 86 | |
87 | 87 | # verbose_name_plural is a special case because it uses a 's' |
88 | 88 | # by default. |
89 | | setattr(self, 'verbose_name_plural', meta_attrs.pop('verbose_name_plural', string_concat(self.verbose_name, 's'))) |
| 89 | self.verbose_name_plural = meta_attrs.pop('verbose_name_plural', string_concat(self.verbose_name, 's')) |
90 | 90 | |
91 | 91 | # Any leftover attributes must be invalid. |
92 | 92 | if meta_attrs != {}: |
diff --git a/django/db/models/query_utils.py b/django/db/models/query_utils.py
index f75b155..c7b79fe 100644
a
|
b
|
def deferred_class_factory(model, attrs):
|
256 | 256 | deferred attributes to a particular instance of the model. |
257 | 257 | """ |
258 | 258 | class Meta: |
259 | | pass |
260 | | setattr(Meta, "proxy", True) |
261 | | setattr(Meta, "app_label", model._meta.app_label) |
| 259 | proxy = True |
| 260 | app_label = model._meta.app_label |
262 | 261 | |
263 | 262 | # The app_cache wants a unique name for each model, otherwise the new class |
264 | 263 | # won't be created (we get an old one back). Therefore, we generate the |
diff --git a/django/forms/forms.py b/django/forms/forms.py
index b3718ef..343956b 100644
a
|
b
|
class BaseForm(StrAndUnicode):
|
268 | 268 | self._clean_form() |
269 | 269 | self._post_clean() |
270 | 270 | if self._errors: |
271 | | delattr(self, 'cleaned_data') |
| 271 | del self.cleaned_data |
272 | 272 | |
273 | 273 | def _clean_fields(self): |
274 | 274 | for name, field in self.fields.items(): |
diff --git a/django/test/simple.py b/django/test/simple.py
index 9013042..be5550f 100644
a
|
b
|
class DjangoTestRunner(unittest.TextTestRunner):
|
58 | 58 | func(test) |
59 | 59 | return stoptest |
60 | 60 | |
61 | | setattr(result, 'stopTest', stoptest_override(result.stopTest)) |
| 61 | result.stopTest = stoptest_override(result.stopTest) |
62 | 62 | return result |
63 | 63 | |
64 | 64 | def get_tests(app_module): |
diff --git a/tests/regressiontests/comment_tests/tests/app_api_tests.py b/tests/regressiontests/comment_tests/tests/app_api_tests.py
index c4d9ebf..4015487 100644
a
|
b
|
class CustomCommentTest(CommentTestCase):
|
41 | 41 | del settings.INSTALLED_APPS[-1] |
42 | 42 | settings.COMMENTS_APP = self.old_comments_app |
43 | 43 | if settings.COMMENTS_APP is None: |
44 | | delattr(settings._wrapped, 'COMMENTS_APP') |
| 44 | del settings._wrapped.COMMENTS_APP |
45 | 45 | |
46 | 46 | def testGetCommentApp(self): |
47 | 47 | from regressiontests.comment_tests import custom_comments |