from django.conf import settings from django.core import formfields, validators from django.core.exceptions import ObjectDoesNotExist from django.utils.functional import curry, lazy from django.utils.text import capfirst from django.utils.translation import gettext_lazy, ngettext import datetime, os class NOT_PROVIDED: pass # Values for filter_interface. HORIZONTAL, VERTICAL = 1, 2 # The values to use for "blank" in SelectFields. Will be appended to the start of most "choices" lists. BLANK_CHOICE_DASH = [("", "---------")] BLANK_CHOICE_NONE = [("", "None")] # Values for Relation.edit_inline. TABULAR, STACKED = 1, 2 RECURSIVE_RELATIONSHIP_CONSTANT = 'self' # prepares a value for use in a LIKE query prep_for_like_query = lambda x: str(x).replace("%", "\%").replace("_", "\_") # returns the