Django

Code

Changeset 6066

Show
Ignore:
Timestamp:
09/08/07 00:11:17 (1 year ago)
Author:
gwilson
Message:

Fixed imports to adhere to PEP 8 and stripped trailing whitespace.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/db/models/fields/__init__.py

    r6065 r6066  
     1import datetime 
     2import os 
     3import time 
     4try: 
     5    import decimal 
     6except ImportError: 
     7    from django.utils import _decimal as decimal    # for Python 2.3 
     8 
    19from django.db import get_creation_module 
    210from django.db.models import signals 
     
    1321from django.utils.encoding import smart_unicode, force_unicode, smart_str 
    1422from django.utils.maxlength import LegacyMaxlength 
    15 import datetime, os, time 
    16 try: 
    17     import decimal 
    18 except ImportError: 
    19     from django.utils import _decimal as decimal    # for Python 2.3 
    2023 
    2124class NOT_PROVIDED: 
     
    383386    def save_form_data(self, instance, data): 
    384387        setattr(instance, self.name, data) 
    385          
     388 
    386389    def formfield(self, form_class=forms.CharField, **kwargs): 
    387390        "Returns a django.newforms.Field instance for this database Field." 
     
    786789        if data: 
    787790            getattr(instance, "save_%s_file" % self.name)(data.filename, data.content, save=False) 
    788          
     791 
    789792    def formfield(self, **kwargs): 
    790793        defaults = {'form_class': forms.FileField} 
    791         # If a file has been provided previously, then the form doesn't require  
     794        # If a file has been provided previously, then the form doesn't require 
    792795        # that a new file is provided this time. 
    793796        if 'initial' in kwargs: