diff --git a/django_hashids/field.py b/django_hashids/field.py index a63f28f..1e6d060 100644 --- a/django_hashids/field.py +++ b/django_hashids/field.py @@ -1,13 +1,13 @@ from django.conf import settings from django.core.exceptions import FieldError -from django.db.models import Field +from django.db.models import TextField, Field from django.utils.functional import cached_property from hashids import Hashids from .exceptions import ConfigError, RealFieldDoesNotExistError -class HashidsField(Field): +class HashidsField(TextField): concrete = False allowed_lookups = ("exact", "iexact", "in", "gt", "gte", "lt", "lte", "isnull") # these should never change, even when Hashids updates @@ -22,7 +22,7 @@ def __init__( salt=None, alphabet=None, min_length=None, - **kwargs + **kwargs, ): kwargs.pop("editable", None) super().__init__(*args, editable=False, **kwargs)