from django.db.models import signals from django.dispatch import dispatcher from django.conf import settings from django.core import validators from django import oldforms from django import newforms as forms from django.core.exceptions import ObjectDoesNotExist from django.utils.functional import curry from django.utils.itercompat import tee from django.utils.text import capfirst from django.utils.translation import gettext, gettext_lazy import datetime, os, time try: import decimal except ImportError: from django.utils import _decimal as decimal # for Python 2.3 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")] # prepares a value for use in a LIKE query prep_for_like_query = lambda x: str(x).replace("\\", "\\\\").replace("%", "\%").replace("_", "\_") # returns the