Ticket #4318: 4318.diff

File 4318.diff, 4.4 KB (added by Gary Wilson <gary.wilson@…>, 18 years ago)

cleaned up imports

  • django/newforms/extras/widgets.py

    === modified file 'django/newforms/extras/widgets.py'
     
    22Extra HTML Widget classes
    33"""
    44
     5import datetime
     6
    57from django.newforms.widgets import Widget, Select
    68from django.utils.dates import MONTHS
    7 import datetime
    89
    910__all__ = ('SelectDateWidget',)
    1011
  • django/newforms/fields.py

    === modified file 'django/newforms/fields.py'
     
    22Field classes
    33"""
    44
     5import datetime
     6import re
     7import time
     8
    59from django.utils.translation import gettext
    610from django.utils.encoding import smart_unicode
     11
    712from util import ErrorList, ValidationError
    813from widgets import TextInput, PasswordInput, HiddenInput, MultipleHiddenInput, CheckboxInput, Select, NullBooleanSelect, SelectMultiple
    9 import datetime
    10 import re
    11 import time
    1214
    1315__all__ = (
    1416    'Field', 'CharField', 'IntegerField',
  • django/newforms/forms.py

    === modified file 'django/newforms/forms.py'
     
    22Form classes
    33"""
    44
    5 from django.utils.datastructures import SortedDict, MultiValueDict
     5import copy
     6
     7from django.utils.datastructures import SortedDict
    68from django.utils.html import escape
    79from django.utils.encoding import StrAndUnicode
     10
    811from fields import Field
    9 from widgets import TextInput, Textarea, HiddenInput, MultipleHiddenInput
     12from widgets import TextInput, Textarea
    1013from util import flatatt, ErrorDict, ErrorList, ValidationError
    11 import copy
    1214
    1315__all__ = ('BaseForm', 'Form')
    1416
  • django/newforms/models.py

    === modified file 'django/newforms/models.py'
     
    44"""
    55
    66from django.utils.translation import gettext
     7
    78from util import ValidationError
    8 from forms import BaseForm, DeclarativeFieldsMetaclass, SortedDictFromList
     9from forms import BaseForm, SortedDictFromList
    910from fields import Field, ChoiceField
    1011from widgets import Select, SelectMultiple, MultipleHiddenInput
    1112
    12 __all__ = ('save_instance', 'form_for_model', 'form_for_instance', 'form_for_fields',
    13            'ModelChoiceField', 'ModelMultipleChoiceField')
     13__all__ = (
     14    'save_instance', 'form_for_model', 'form_for_instance', 'form_for_fields',
     15    'ModelChoiceField', 'ModelMultipleChoiceField'
     16)
    1417
    1518def save_instance(form, instance, fields=None, fail_message='saved', commit=True):
    1619    """
  • django/newforms/util.py

    === modified file 'django/newforms/util.py'
     
    1 from django.conf import settings
    21from django.utils.html import escape
    3 from django.utils.functional import Promise, lazy
    42from django.utils.encoding import smart_unicode
    53
    64# Converts a dictionary to a single string with key="value", XML-style with
  • django/newforms/widgets.py

    === modified file 'django/newforms/widgets.py'
     
    22HTML Widget classes
    33"""
    44
    5 __all__ = (
    6     'Widget', 'TextInput', 'PasswordInput', 'HiddenInput', 'MultipleHiddenInput',
    7     'FileInput', 'Textarea', 'CheckboxInput',
    8     'Select', 'NullBooleanSelect', 'SelectMultiple', 'RadioSelect', 'CheckboxSelectMultiple',
    9     'MultiWidget', 'SplitDateTimeWidget',
    10 )
     5try:
     6    set # Only available in Python 2.4+
     7except NameError:
     8    from sets import Set as set # Python 2.3 fallback
     9from itertools import chain
    1110
    12 from util import flatatt
    1311from django.utils.datastructures import MultiValueDict
    1412from django.utils.html import escape
    1513from django.utils.translation import gettext
    1614from django.utils.encoding import StrAndUnicode, smart_unicode
    17 from itertools import chain
    18 
    19 try:
    20     set # Only available in Python 2.4+
    21 except NameError:
    22     from sets import Set as set # Python 2.3 fallback
     15
     16from util import flatatt
     17
     18__all__ = (
     19    'Widget', 'TextInput', 'PasswordInput',
     20    'HiddenInput', 'MultipleHiddenInput',
     21    'FileInput', 'Textarea', 'CheckboxInput',
     22    'Select', 'NullBooleanSelect', 'SelectMultiple', 'RadioSelect',
     23    'CheckboxSelectMultiple', 'MultiWidget', 'SplitDateTimeWidget',
     24)
    2325
    2426class Widget(object):
    2527    is_hidden = False          # Determines whether this corresponds to an <input type="hidden">.
Back to Top