magic-removal: Changed inner-class name in models from MANIPULATOR to Manipulator

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2096 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-01-21 06:40:52 +00:00
parent 43d6bef62b
commit 387f453db5
1 changed files with 5 additions and 4 deletions

View File

@ -26,11 +26,12 @@ class ManipulatorDescriptor(object):
raise "Manipulator can not be accessed via instance"
else:
if not self.man:
# Create a class which inherits from the MANIPULATOR class given in the class,
# and the appropriate automatic manipulator,
# Create a class that inherits from the "Manipulator" class
# given in the model class (if specified) and the automatic
# manipulator.
bases = [self.base]
if hasattr(type, 'MANIPULATOR'):
bases = [type.MANIPULATOR] + bases
if hasattr(type, 'Manipulator'):
bases = [type.Manipulator] + bases
self.man = types.ClassType(self.name, tuple(bases), {})
self.man._prepare(type)
return self.man