import copy import datetime import os import time try: import decimal except ImportError: from django.utils import _decimal as decimal # for Python 2.3 from django.db import connection, get_creation_module from django.db.models import signals from django.db.models.query_utils import QueryWrapper 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.datastructures import DictWrapper from django.utils.functional import curry from django.utils.itercompat import tee from django.utils.text import capfirst from django.utils.translation import ugettext_lazy, ugettext as _ from django.utils.encoding import smart_unicode, force_unicode, smart_str from django.utils.maxlength import LegacyMaxlength 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")] # returns the