Skip to content
Browse files

Fixed #5444 -- Changed manipulator class construction to use type(), …

…rather than types.ClassType(). Helps with Jython compatibility. Patch from Leo Soto.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6277 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 39814ee commit 7a6abfdd3bca22b7cffbaaa91b872f28be7c12e6 @malcolmt malcolmt committed
Showing with 1 addition and 2 deletions.
  1. +1 −2 django/db/models/manipulators.py
View
3 django/db/models/manipulators.py
@@ -9,7 +9,6 @@
from django.utils.text import capfirst
from django.utils.encoding import smart_str
from django.utils.translation import ugettext as _
-import types
def add_manipulators(sender):
cls = sender
@@ -38,7 +37,7 @@ def __get__(self, instance, model=None):
bases = [self.base]
if hasattr(model, 'Manipulator'):
bases = [model.Manipulator] + bases
- self.man = types.ClassType(self.name, tuple(bases), {})
+ self.man = type(self.name, tuple(bases), {})
self.man._prepare(model)
return self.man

0 comments on commit 7a6abfd

Please sign in to comment.
Something went wrong with that request. Please try again.