diff options
Diffstat (limited to 'django/db/models/fields/subclassing.py')
-rw-r--r-- | django/db/models/fields/subclassing.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/django/db/models/fields/subclassing.py b/django/db/models/fields/subclassing.py index 36f7e4d934..10add10739 100644 --- a/django/db/models/fields/subclassing.py +++ b/django/db/models/fields/subclassing.py @@ -5,9 +5,7 @@ Add SubfieldBase as the __metaclass__ for your Field subclass, implement to_python() and the other necessary methods and everything will work seamlessly. """ -from django.utils.maxlength import LegacyMaxlength - -class SubfieldBase(LegacyMaxlength): +class SubfieldBase(type): """ A metaclass for custom Field subclasses. This ensures the model's attribute has the descriptor protocol attached to it. @@ -50,4 +48,3 @@ def make_contrib(func=None): setattr(cls, self.name, Creator(self)) return contribute_to_class - |