Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions django_hashids/field.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
Expand Down