from django.conf import settings from django.core import formfields, validators from django.core.exceptions import ObjectDoesNotExist from django.utils.functional import curry from django.utils.text import capfirst import datetime, os # Random entropy string used by "default" param. NOT_PROVIDED = 'oijpwojefiojpanv' # 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_type. 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