From 2a04bb9b583a4c4fa7ce455c0bbd2ebc51bbbac2 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 16 Jan 2006 23:35:09 +0000 Subject: [PATCH] magic-removal: Changed variable name in django.db.models.base.Model.add_to_class() git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2019 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/base.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/django/db/models/base.py b/django/db/models/base.py index a34a5af29d..d8b94f07d3 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -106,13 +106,13 @@ class Model(object): setattr(self, self._meta.fields[i].attname, arg) dispatcher.send(signal=signals.post_init, sender=self.__class__, instance=self) - def add_to_class(cls, name, attribute): + def add_to_class(cls, name, value): if name == 'Admin': - attribute = AdminOptions(**dict([(k, v) for k, v in attribute.__dict__.items() if not k.startswith('_')])) - if hasattr(attribute, 'contribute_to_class'): - attribute.contribute_to_class(cls, name) + value = AdminOptions(**dict([(k, v) for k, v in value.__dict__.items() if not k.startswith('_')])) + if hasattr(value, 'contribute_to_class'): + value.contribute_to_class(cls, name) else: - setattr(cls, name, attribute) + setattr(cls, name, value) add_to_class = classmethod(add_to_class) def _prepare(cls):