-
diff --git a/django/bin/profiling/gather_profile_stats.py b/django/bin/profiling/gather_profile_stats.py
index 0fd2b7f..2274ead 100644
a
|
b
|
hotshot.stats (the formats are incompatible)
|
8 | 8 | """ |
9 | 9 | |
10 | 10 | from hotshot import stats |
| 11 | import os |
11 | 12 | import pstats |
12 | | import sys, os |
| 13 | import sys |
13 | 14 | |
14 | 15 | def gather_stats(p): |
15 | 16 | profiles = {} |
-
diff --git a/django/contrib/admin/templatetags/admin_list.py b/django/contrib/admin/templatetags/admin_list.py
index c74657a..e07414b 100644
a
|
b
|
import datetime
|
3 | 3 | from django.conf import settings |
4 | 4 | from django.contrib.admin.util import lookup_field, display_for_field, label_for_field |
5 | 5 | from django.contrib.admin.views.main import (ALL_VAR, EMPTY_CHANGELIST_VALUE, |
6 | | ORDER_VAR, ORDER_TYPE_VAR, PAGE_VAR, SEARCH_VAR) |
| 6 | ORDER_VAR, PAGE_VAR, SEARCH_VAR) |
7 | 7 | from django.core.exceptions import ObjectDoesNotExist |
8 | 8 | from django.db import models |
9 | 9 | from django.utils import formats |
10 | | from django.utils.datastructures import SortedDict |
11 | 10 | from django.utils.html import escape, conditional_escape |
12 | 11 | from django.utils.safestring import mark_safe |
13 | 12 | from django.utils.text import capfirst |
-
diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py
index aea656f..d7adc48 100644
a
|
b
|
MAX_SHOW_ALL_ALLOWED = 200
|
19 | 19 | # Changelist settings |
20 | 20 | ALL_VAR = 'all' |
21 | 21 | ORDER_VAR = 'o' |
22 | | ORDER_TYPE_VAR = 'ot' |
23 | 22 | PAGE_VAR = 'p' |
24 | 23 | SEARCH_VAR = 'q' |
25 | 24 | TO_FIELD_VAR = 't' |
26 | 25 | IS_POPUP_VAR = 'pop' |
27 | 26 | ERROR_FLAG = 'e' |
28 | 27 | |
29 | | IGNORED_PARAMS = ( |
30 | | ALL_VAR, ORDER_VAR, ORDER_TYPE_VAR, SEARCH_VAR, IS_POPUP_VAR, TO_FIELD_VAR) |
| 28 | IGNORED_PARAMS = (ALL_VAR, ORDER_VAR, SEARCH_VAR, IS_POPUP_VAR, TO_FIELD_VAR) |
31 | 29 | |
32 | 30 | # Text to display within change-list table cells if the value is blank. |
33 | 31 | EMPTY_CHANGELIST_VALUE = ugettext_lazy('(None)') |
-
diff --git a/django/contrib/admindocs/views.py b/django/contrib/admindocs/views.py
index 319b489..a1d6b9b 100644
a
|
b
|
|
1 | | from django import template, templatetags |
| 1 | import inspect |
| 2 | import os |
| 3 | import re |
| 4 | |
| 5 | from django import template |
2 | 6 | from django.template import RequestContext |
3 | 7 | from django.conf import settings |
4 | 8 | from django.contrib.admin.views.decorators import staff_member_required |
… |
… |
from django.contrib.sites.models import Site
|
12 | 16 | from django.utils.importlib import import_module |
13 | 17 | from django.utils.translation import ugettext as _ |
14 | 18 | from django.utils.safestring import mark_safe |
15 | | import inspect, os, re |
16 | 19 | |
17 | 20 | # Exclude methods starting with these strings from documentation |
18 | 21 | MODEL_METHODS_EXCLUDE = ('_', 'add_', 'delete', 'save', 'set_') |
-
diff --git a/django/contrib/auth/__init__.py b/django/contrib/auth/__init__.py
index f11f830..141cac7 100644
a
|
b
|
|
1 | | import datetime |
2 | 1 | from warnings import warn |
3 | 2 | from django.core.exceptions import ImproperlyConfigured |
4 | 3 | from django.utils.importlib import import_module |
-
diff --git a/django/contrib/auth/backends.py b/django/contrib/auth/backends.py
index d8c8140..fc751c7 100644
a
|
b
|
|
1 | | from django.db import connection |
2 | 1 | from django.contrib.auth.models import User, Permission |
3 | 2 | |
4 | 3 | |
-
diff --git a/django/contrib/auth/management/__init__.py b/django/contrib/auth/management/__init__.py
index 9966849..f82060e 100644
a
|
b
|
def get_default_username(check_db=True):
|
102 | 102 | :returns: The username, or an empty string if no username can be |
103 | 103 | determined. |
104 | 104 | """ |
105 | | from django.contrib.auth.management.commands.createsuperuser import \ |
106 | | RE_VALID_USERNAME |
| 105 | from django.contrib.auth.management.commands.createsuperuser import ( |
| 106 | RE_VALID_USERNAME) |
107 | 107 | default_username = get_system_username() |
108 | 108 | try: |
109 | 109 | default_username = unicodedata.normalize('NFKD', default_username)\ |
-
diff --git a/django/contrib/auth/tests/auth_backends.py b/django/contrib/auth/tests/auth_backends.py
index 63b65ad..5163943 100644
a
|
b
|
|
1 | | import warnings |
2 | | |
3 | 1 | from django.conf import settings |
4 | 2 | from django.contrib.auth.models import User, Group, Permission, AnonymousUser |
5 | 3 | from django.contrib.contenttypes.models import ContentType |
-
diff --git a/django/contrib/auth/tests/tokens.py b/django/contrib/auth/tests/tokens.py
index 9211e06..f7fc32e 100644
a
|
b
|
|
1 | 1 | from datetime import date, timedelta |
2 | 2 | |
3 | 3 | from django.conf import settings |
4 | | from django.contrib.auth.models import User, AnonymousUser |
| 4 | from django.contrib.auth.models import User |
5 | 5 | from django.contrib.auth.tokens import PasswordResetTokenGenerator |
6 | 6 | from django.test import TestCase |
7 | 7 | |
-
diff --git a/django/contrib/formtools/preview.py b/django/contrib/formtools/preview.py
index b4cdeba..d2e6987 100644
a
|
b
|
|
2 | 2 | Formtools Preview application. |
3 | 3 | """ |
4 | 4 | |
5 | | try: |
6 | | import cPickle as pickle |
7 | | except ImportError: |
8 | | import pickle |
9 | | |
10 | | from django.conf import settings |
11 | 5 | from django.http import Http404 |
12 | 6 | from django.shortcuts import render_to_response |
13 | 7 | from django.template.context import RequestContext |
-
diff --git a/django/contrib/formtools/utils.py b/django/contrib/formtools/utils.py
index 4489506..3c0f7db 100644
a
|
b
|
except ImportError:
|
5 | 5 | |
6 | 6 | import hashlib |
7 | 7 | from django.conf import settings |
8 | | from django.forms import BooleanField |
9 | 8 | from django.utils.crypto import salted_hmac |
10 | 9 | |
11 | 10 | |
-
diff --git a/django/contrib/formtools/wizard/storage/session.py b/django/contrib/formtools/wizard/storage/session.py
index 84a3848..9cfae50 100644
a
|
b
|
|
1 | | from django.core.files.uploadedfile import UploadedFile |
2 | 1 | from django.contrib.formtools.wizard import storage |
3 | 2 | |
4 | 3 | |
-
diff --git a/django/contrib/formtools/wizard/views.py b/django/contrib/formtools/wizard/views.py
index ac9cfbd..925e16f 100644
a
|
b
|
|
1 | | import copy |
2 | 1 | import re |
3 | 2 | |
4 | 3 | from django import forms |
-
diff --git a/django/contrib/gis/admin/options.py b/django/contrib/gis/admin/options.py
index 8e1faf2..1014cb3 100644
a
|
b
|
|
1 | | from django.conf import settings |
2 | 1 | from django.contrib.admin import ModelAdmin |
3 | 2 | from django.contrib.gis.admin.widgets import OpenLayersWidget |
4 | 3 | from django.contrib.gis.gdal import OGRGeomType |
-
diff --git a/django/contrib/gis/db/backends/base.py b/django/contrib/gis/db/backends/base.py
index 0eaacae..2a62d97 100644
a
|
b
|
Base/mixin classes for the spatial backend database operations and the
|
3 | 3 | `SpatialRefSys` model the backend. |
4 | 4 | """ |
5 | 5 | import re |
6 | | from django.conf import settings |
7 | 6 | from django.contrib.gis import gdal |
8 | 7 | |
9 | 8 | class BaseSpatialOperations(object): |
-
diff --git a/django/contrib/gis/db/backends/oracle/models.py b/django/contrib/gis/db/backends/oracle/models.py
index de757ff..ed29f7b 100644
a
|
b
|
|
8 | 8 | model and the `SDO_COORD_REF_SYS` is used for the SpatialRefSys model. |
9 | 9 | """ |
10 | 10 | from django.contrib.gis.db import models |
11 | | from django.contrib.gis.db.models.fields import GeometryField |
12 | 11 | from django.contrib.gis.db.backends.base import SpatialRefSysMixin |
13 | 12 | |
14 | 13 | class GeometryColumns(models.Model): |
-
diff --git a/django/contrib/gis/db/backends/spatialite/base.py b/django/contrib/gis/db/backends/spatialite/base.py
index 729fc15..50467fc 100644
a
|
b
|
from django.conf import settings
|
3 | 3 | |
4 | 4 | from django.core.exceptions import ImproperlyConfigured |
5 | 5 | from django.db.backends.sqlite3.base import * |
6 | | from django.db.backends.sqlite3.base import DatabaseWrapper as SqliteDatabaseWrapper, \ |
7 | | _sqlite_extract, _sqlite_date_trunc, _sqlite_regexp |
| 6 | from django.db.backends.sqlite3.base import DatabaseWrapper as SqliteDatabaseWrapper |
| 7 | from django.db.backends.sqlite3.base import _sqlite_extract, _sqlite_date_trunc, _sqlite_regexp |
8 | 8 | from django.contrib.gis.db.backends.spatialite.client import SpatiaLiteClient |
9 | 9 | from django.contrib.gis.db.backends.spatialite.creation import SpatiaLiteCreation |
10 | 10 | from django.contrib.gis.db.backends.spatialite.introspection import SpatiaLiteIntrospection |
-
diff --git a/django/contrib/gis/db/models/__init__.py b/django/contrib/gis/db/models/__init__.py
index 87e2b68..e36aa36 100644
a
|
b
|
from django.contrib.gis.db.models.aggregates import *
|
8 | 8 | from django.contrib.gis.db.models.manager import GeoManager |
9 | 9 | |
10 | 10 | # The geographic-enabled fields. |
11 | | from django.contrib.gis.db.models.fields import \ |
12 | | GeometryField, PointField, LineStringField, PolygonField, \ |
13 | | MultiPointField, MultiLineStringField, MultiPolygonField, \ |
14 | | GeometryCollectionField |
| 11 | from django.contrib.gis.db.models.fields import ( |
| 12 | GeometryField, PointField, LineStringField, PolygonField, |
| 13 | MultiPointField, MultiLineStringField, MultiPolygonField, |
| 14 | GeometryCollectionField) |
-
diff --git a/django/contrib/gis/db/models/query.py b/django/contrib/gis/db/models/query.py
index 4df1a3a..c1e360d 100644
a
|
b
|
|
1 | 1 | from django.db import connections |
2 | | from django.db.models.query import QuerySet, Q, ValuesQuerySet, ValuesListQuerySet |
| 2 | from django.db.models.query import QuerySet, ValuesQuerySet, ValuesListQuerySet |
3 | 3 | |
4 | 4 | from django.contrib.gis.db.models import aggregates |
5 | | from django.contrib.gis.db.models.fields import get_srid_info, GeometryField, PointField, LineStringField |
6 | | from django.contrib.gis.db.models.sql import AreaField, DistanceField, GeomField, GeoQuery, GeoWhereNode |
| 5 | from django.contrib.gis.db.models.fields import get_srid_info, PointField, LineStringField |
| 6 | from django.contrib.gis.db.models.sql import AreaField, DistanceField, GeomField, GeoQuery |
7 | 7 | from django.contrib.gis.geometry.backend import Geometry |
8 | 8 | from django.contrib.gis.measure import Area, Distance |
9 | 9 | |
-
diff --git a/django/contrib/gis/db/models/sql/aggregates.py b/django/contrib/gis/db/models/sql/aggregates.py
index fed2a2e..9fcbb51 100644
a
|
b
|
|
1 | 1 | from django.db.models.sql.aggregates import * |
2 | 2 | from django.contrib.gis.db.models.fields import GeometryField |
3 | | from django.contrib.gis.db.models.sql.conversion import GeomField |
4 | 3 | |
5 | 4 | class GeoAggregate(Aggregate): |
6 | 5 | # Default SQL template for spatial aggregates. |
-
diff --git a/django/contrib/gis/db/models/sql/where.py b/django/contrib/gis/db/models/sql/where.py
index 17c210b..0e15222 100644
a
|
b
|
|
1 | | from django.db.models.fields import Field, FieldDoesNotExist |
| 1 | from django.db.models.fields import FieldDoesNotExist |
2 | 2 | from django.db.models.sql.constants import LOOKUP_SEP |
3 | 3 | from django.db.models.sql.expressions import SQLEvaluator |
4 | 4 | from django.db.models.sql.where import Constraint, WhereNode |
-
diff --git a/django/contrib/gis/feeds.py b/django/contrib/gis/feeds.py
index 4105ef7..c080352 100644
a
|
b
|
|
1 | | from django.contrib.syndication.feeds import Feed as BaseFeed, FeedDoesNotExist |
| 1 | from django.contrib.syndication.feeds import Feed as BaseFeed |
2 | 2 | from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed |
3 | 3 | |
4 | 4 | class GeoFeedMixin(object): |
-
diff --git a/django/contrib/gis/gdal/datasource.py b/django/contrib/gis/gdal/datasource.py
index 7db5fd9..e5f3602 100644
a
|
b
|
|
34 | 34 | val = field.value |
35 | 35 | """ |
36 | 36 | # ctypes prerequisites. |
37 | | from ctypes import byref, c_void_p |
| 37 | from ctypes import byref |
38 | 38 | |
39 | 39 | # The GDAL C library, OGR exceptions, and the Layer object. |
40 | 40 | from django.contrib.gis.gdal.base import GDALBase |
-
diff --git a/django/contrib/gis/gdal/feature.py b/django/contrib/gis/gdal/feature.py
index b5c173a..47fd9e5 100644
a
|
b
|
from django.contrib.gis.gdal.base import GDALBase
|
3 | 3 | from django.contrib.gis.gdal.error import OGRException, OGRIndexError |
4 | 4 | from django.contrib.gis.gdal.field import Field |
5 | 5 | from django.contrib.gis.gdal.geometries import OGRGeometry, OGRGeomType |
6 | | from django.contrib.gis.gdal.srs import SpatialReference |
7 | 6 | |
8 | 7 | # ctypes function prototypes |
9 | 8 | from django.contrib.gis.gdal.prototypes import ds as capi, geom as geom_api |
-
diff --git a/django/contrib/gis/gdal/libgdal.py b/django/contrib/gis/gdal/libgdal.py
index 256ddb2..d904327 100644
a
|
b
|
|
1 | | import os, re, sys |
| 1 | import os |
| 2 | import re |
2 | 3 | from ctypes import c_char_p, CDLL |
3 | 4 | from ctypes.util import find_library |
4 | 5 | from django.contrib.gis.gdal.error import OGRException |
-
diff --git a/django/contrib/gis/gdal/prototypes/ds.py b/django/contrib/gis/gdal/prototypes/ds.py
index 44828ee..d8537bc 100644
a
|
b
|
|
6 | 6 | from ctypes import c_char_p, c_double, c_int, c_long, c_void_p, POINTER |
7 | 7 | from django.contrib.gis.gdal.envelope import OGREnvelope |
8 | 8 | from django.contrib.gis.gdal.libgdal import lgdal |
9 | | from django.contrib.gis.gdal.prototypes.generation import \ |
10 | | const_string_output, double_output, geom_output, int_output, \ |
11 | | srs_output, void_output, voidptr_output |
| 9 | from django.contrib.gis.gdal.prototypes.generation import (const_string_output, |
| 10 | double_output, geom_output, int_output, srs_output, void_output, voidptr_output) |
12 | 11 | |
13 | 12 | c_int_p = POINTER(c_int) # shortcut type |
14 | 13 | |
-
diff --git a/django/contrib/gis/gdal/prototypes/generation.py b/django/contrib/gis/gdal/prototypes/generation.py
index 1303532..45cffd6 100644
a
|
b
|
|
4 | 4 | """ |
5 | 5 | |
6 | 6 | from ctypes import c_char_p, c_double, c_int, c_void_p |
7 | | from django.contrib.gis.gdal.prototypes.errcheck import \ |
8 | | check_arg_errcode, check_errcode, check_geom, check_geom_offset, \ |
9 | | check_pointer, check_srs, check_str_arg, check_string, check_const_string |
| 7 | from django.contrib.gis.gdal.prototypes.errcheck import ( |
| 8 | check_arg_errcode, check_errcode, check_geom, check_geom_offset, |
| 9 | check_pointer, check_srs, check_str_arg, check_string, check_const_string) |
10 | 10 | |
11 | 11 | class gdal_char_p(c_char_p): |
12 | 12 | pass |
-
diff --git a/django/contrib/gis/gdal/prototypes/geom.py b/django/contrib/gis/gdal/prototypes/geom.py
index e002590..7fa8391 100644
a
|
b
|
|
1 | | import re |
2 | | from datetime import date |
3 | | from ctypes import c_char, c_char_p, c_double, c_int, c_ubyte, c_void_p, POINTER |
| 1 | from ctypes import c_char_p, c_double, c_int, c_void_p, POINTER |
4 | 2 | from django.contrib.gis.gdal.envelope import OGREnvelope |
5 | 3 | from django.contrib.gis.gdal.libgdal import lgdal, GEOJSON |
6 | 4 | from django.contrib.gis.gdal.prototypes.errcheck import check_bool, check_envelope |
7 | | from django.contrib.gis.gdal.prototypes.generation import \ |
8 | | const_string_output, double_output, geom_output, int_output, \ |
9 | | srs_output, string_output, void_output |
| 5 | from django.contrib.gis.gdal.prototypes.generation import (const_string_output, |
| 6 | double_output, geom_output, int_output, srs_output, string_output, void_output) |
10 | 7 | |
11 | 8 | ### Generation routines specific to this module ### |
12 | 9 | def env_func(f, argtypes): |
-
diff --git a/django/contrib/gis/gdal/prototypes/srs.py b/django/contrib/gis/gdal/prototypes/srs.py
index 411cec9..66cf84c 100644
a
|
b
|
|
1 | 1 | from ctypes import c_char_p, c_int, c_void_p, POINTER |
2 | 2 | from django.contrib.gis.gdal.libgdal import lgdal, std_call |
3 | | from django.contrib.gis.gdal.prototypes.generation import \ |
4 | | const_string_output, double_output, int_output, \ |
5 | | srs_output, string_output, void_output |
| 3 | from django.contrib.gis.gdal.prototypes.generation import (const_string_output, |
| 4 | double_output, int_output, srs_output, string_output, void_output) |
6 | 5 | |
7 | 6 | ## Shortcut generation for routines with known parameters. |
8 | 7 | def srs_double(f): |
-
diff --git a/django/contrib/gis/gdal/srs.py b/django/contrib/gis/gdal/srs.py
index 95e71f1..e211bac 100644
a
|
b
|
|
26 | 26 | >>> print srs.name |
27 | 27 | NAD83 / Texas South Central |
28 | 28 | """ |
29 | | import re |
30 | | from ctypes import byref, c_char_p, c_int, c_void_p |
| 29 | from ctypes import byref, c_char_p, c_int |
31 | 30 | |
32 | 31 | # Getting the error checking routine and exceptions |
33 | 32 | from django.contrib.gis.gdal.base import GDALBase |
34 | | from django.contrib.gis.gdal.error import OGRException, SRSException |
| 33 | from django.contrib.gis.gdal.error import SRSException |
35 | 34 | from django.contrib.gis.gdal.prototypes import srs as capi |
36 | 35 | |
37 | 36 | #### Spatial Reference class. #### |
-
diff --git a/django/contrib/gis/gdal/tests/test_driver.py b/django/contrib/gis/gdal/tests/test_driver.py
index 1ff65ac..06ec93f 100644
a
|
b
|
|
1 | | import os, os.path, unittest |
| 1 | import unittest |
2 | 2 | from django.contrib.gis.gdal import Driver, OGRException |
3 | 3 | |
4 | 4 | valid_drivers = ('ESRI Shapefile', 'MapInfo File', 'TIGER', 'S57', 'DGN', |
-
diff --git a/django/contrib/gis/gdal/tests/test_geom.py b/django/contrib/gis/gdal/tests/test_geom.py
index 7d4a1ff..5703a09 100644
a
|
b
|
|
1 | | from django.contrib.gis.gdal import OGRGeometry, OGRGeomType, \ |
2 | | OGRException, OGRIndexError, SpatialReference, CoordTransform, \ |
3 | | GDAL_VERSION |
| 1 | from django.contrib.gis.gdal import (OGRGeometry, OGRGeomType, OGRException, |
| 2 | OGRIndexError, SpatialReference, CoordTransform, GDAL_VERSION) |
4 | 3 | from django.utils import unittest |
5 | 4 | from django.contrib.gis.geometry.test_data import TestDataMixin |
6 | 5 | |
… |
… |
class OGRGeomTest(unittest.TestCase, TestDataMixin):
|
446 | 445 | |
447 | 446 | def test17_pickle(self): |
448 | 447 | "Testing pickle support." |
449 | | import cPickle |
| 448 | try: |
| 449 | import cPickle as pickle |
| 450 | except ImportError: |
| 451 | import pickle |
450 | 452 | g1 = OGRGeometry('LINESTRING(1 1 1,2 2 2,3 3 3)', 'WGS84') |
451 | | g2 = cPickle.loads(cPickle.dumps(g1)) |
| 453 | g2 = pickle.loads(pickle.dumps(g1)) |
452 | 454 | self.assertEqual(g1, g2) |
453 | 455 | self.assertEqual(4326, g2.srs.srid) |
454 | 456 | self.assertEqual(g1.srs.wkt, g2.srs.wkt) |
-
diff --git a/django/contrib/gis/geometry/backend/geos.py b/django/contrib/gis/geometry/backend/geos.py
index a1ac096..cdc40ed 100644
a
|
b
|
|
1 | | from django.contrib.gis.geos import \ |
2 | | GEOSGeometry as Geometry, \ |
3 | | GEOSException as GeometryException |
| 1 | from django.contrib.gis.geos import ( |
| 2 | GEOSGeometry as Geometry, GEOSException as GeometryException) |
-
diff --git a/django/contrib/gis/geos/base.py b/django/contrib/gis/geos/base.py
index 34c03c8..b3012dd 100644
a
|
b
|
|
1 | 1 | from ctypes import c_void_p |
2 | 2 | from types import NoneType |
3 | | from django.contrib.gis.geos.error import GEOSException, GEOSIndexError |
| 3 | from django.contrib.gis.geos.error import GEOSException |
4 | 4 | |
5 | 5 | # Trying to import GDAL libraries, if available. Have to place in |
6 | 6 | # try/except since this package may be used outside GeoDjango. |
-
diff --git a/django/contrib/gis/geos/collections.py b/django/contrib/gis/geos/collections.py
index 515f80e..8b0edf5 100644
a
|
b
|
|
3 | 3 | GeometryCollection, MultiPoint, MultiLineString, and MultiPolygon |
4 | 4 | """ |
5 | 5 | from ctypes import c_int, c_uint, byref |
6 | | from django.contrib.gis.geos.error import GEOSException, GEOSIndexError |
| 6 | from django.contrib.gis.geos.error import GEOSException |
7 | 7 | from django.contrib.gis.geos.geometry import GEOSGeometry |
8 | | from django.contrib.gis.geos.libgeos import get_pointer_arr, GEOM_PTR, GEOS_PREPARE |
| 8 | from django.contrib.gis.geos.libgeos import get_pointer_arr, GEOS_PREPARE |
9 | 9 | from django.contrib.gis.geos.linestring import LineString, LinearRing |
10 | 10 | from django.contrib.gis.geos.point import Point |
11 | 11 | from django.contrib.gis.geos.polygon import Polygon |
-
diff --git a/django/contrib/gis/geos/geometry.py b/django/contrib/gis/geos/geometry.py
index a9d1264..c56eeb3 100644
a
|
b
|
|
3 | 3 | inherit from this object. |
4 | 4 | """ |
5 | 5 | # Python, ctypes and types dependencies. |
6 | | import re |
7 | 6 | import warnings |
8 | | from ctypes import addressof, byref, c_double, c_size_t |
| 7 | from ctypes import addressof, byref, c_double |
9 | 8 | |
10 | 9 | # super-class for mutable list behavior |
11 | 10 | from django.contrib.gis.geos.mutable_list import ListMixin |
-
diff --git a/django/contrib/gis/geos/libgeos.py b/django/contrib/gis/geos/libgeos.py
index 7e1dfa0..e73fcdb 100644
a
|
b
|
|
6 | 6 | This module also houses GEOS Pointer utilities, including |
7 | 7 | get_pointer_arr(), and GEOM_PTR. |
8 | 8 | """ |
9 | | import os, re, sys |
| 9 | import os |
| 10 | import re |
| 11 | import sys |
10 | 12 | from ctypes import c_char_p, Structure, CDLL, CFUNCTYPE, POINTER |
11 | 13 | from ctypes.util import find_library |
12 | 14 | from django.contrib.gis.geos.error import GEOSException |
-
diff --git a/django/contrib/gis/geos/polygon.py b/django/contrib/gis/geos/polygon.py
index 92b2e4c..77ce60c 100644
a
|
b
|
|
1 | 1 | from ctypes import c_uint, byref |
2 | | from django.contrib.gis.geos.error import GEOSIndexError |
3 | 2 | from django.contrib.gis.geos.geometry import GEOSGeometry |
4 | 3 | from django.contrib.gis.geos.libgeos import get_pointer_arr, GEOM_PTR |
5 | 4 | from django.contrib.gis.geos.linestring import LinearRing |
-
diff --git a/django/contrib/gis/geos/prototypes/__init__.py b/django/contrib/gis/geos/prototypes/__init__.py
index 23735f5..89b96c0 100644
a
|
b
|
|
5 | 5 | """ |
6 | 6 | |
7 | 7 | # Coordinate sequence routines. |
8 | | from django.contrib.gis.geos.prototypes.coordseq import create_cs, get_cs, \ |
9 | | cs_clone, cs_getordinate, cs_setordinate, cs_getx, cs_gety, cs_getz, \ |
10 | | cs_setx, cs_sety, cs_setz, cs_getsize, cs_getdims |
| 8 | from django.contrib.gis.geos.prototypes.coordseq import (create_cs, get_cs, |
| 9 | cs_clone, cs_getordinate, cs_setordinate, cs_getx, cs_gety, cs_getz, |
| 10 | cs_setx, cs_sety, cs_setz, cs_getsize, cs_getdims) |
11 | 11 | |
12 | 12 | # Geometry routines. |
13 | | from django.contrib.gis.geos.prototypes.geom import from_hex, from_wkb, from_wkt, \ |
14 | | create_point, create_linestring, create_linearring, create_polygon, create_collection, \ |
15 | | destroy_geom, get_extring, get_intring, get_nrings, get_geomn, geom_clone, \ |
16 | | geos_normalize, geos_type, geos_typeid, geos_get_srid, geos_set_srid, \ |
17 | | get_dims, get_num_coords, get_num_geoms, \ |
18 | | to_hex, to_wkb, to_wkt |
| 13 | from django.contrib.gis.geos.prototypes.geom import (from_hex, from_wkb, from_wkt, |
| 14 | create_point, create_linestring, create_linearring, create_polygon, create_collection, |
| 15 | destroy_geom, get_extring, get_intring, get_nrings, get_geomn, geom_clone, |
| 16 | geos_normalize, geos_type, geos_typeid, geos_get_srid, geos_set_srid, |
| 17 | get_dims, get_num_coords, get_num_geoms, |
| 18 | to_hex, to_wkb, to_wkt) |
19 | 19 | |
20 | 20 | # Miscellaneous routines. |
21 | 21 | from django.contrib.gis.geos.prototypes.misc import * |
22 | 22 | |
23 | 23 | # Predicates |
24 | | from django.contrib.gis.geos.prototypes.predicates import geos_hasz, geos_isempty, \ |
25 | | geos_isring, geos_issimple, geos_isvalid, geos_contains, geos_crosses, \ |
26 | | geos_disjoint, geos_equals, geos_equalsexact, geos_intersects, \ |
27 | | geos_intersects, geos_overlaps, geos_relatepattern, geos_touches, geos_within |
| 24 | from django.contrib.gis.geos.prototypes.predicates import (geos_hasz, geos_isempty, |
| 25 | geos_isring, geos_issimple, geos_isvalid, geos_contains, geos_crosses, |
| 26 | geos_disjoint, geos_equals, geos_equalsexact, geos_intersects, |
| 27 | geos_intersects, geos_overlaps, geos_relatepattern, geos_touches, geos_within) |
28 | 28 | |
29 | 29 | # Topology routines |
30 | 30 | from django.contrib.gis.geos.prototypes.topology import * |
-
diff --git a/django/contrib/gis/geos/prototypes/geom.py b/django/contrib/gis/geos/prototypes/geom.py
index 03f9897..5a614fe 100644
a
|
b
|
|
1 | | from ctypes import c_char_p, c_int, c_size_t, c_ubyte, c_uint, POINTER |
2 | | from django.contrib.gis.geos.libgeos import CS_PTR, GEOM_PTR, PREPGEOM_PTR, GEOS_PREPARE |
3 | | from django.contrib.gis.geos.prototypes.errcheck import \ |
4 | | check_geom, check_minus_one, check_sized_string, check_string, check_zero |
| 1 | from ctypes import c_char_p, c_int, c_size_t, c_ubyte, POINTER |
| 2 | from django.contrib.gis.geos.libgeos import CS_PTR, GEOM_PTR |
| 3 | from django.contrib.gis.geos.prototypes.errcheck import ( |
| 4 | check_geom, check_minus_one, check_sized_string, check_string, check_zero) |
5 | 5 | from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc |
6 | 6 | |
7 | 7 | # This is the return type used by binary output (WKB, HEX) routines. |
-
diff --git a/django/contrib/gis/geos/prototypes/topology.py b/django/contrib/gis/geos/prototypes/topology.py
index 50817f9..cc5734b 100644
a
|
b
|
__all__ = ['geos_boundary', 'geos_buffer', 'geos_centroid', 'geos_convexhull',
|
7 | 7 | 'geos_linemerge', 'geos_pointonsurface', 'geos_preservesimplify', |
8 | 8 | 'geos_simplify', 'geos_symdifference', 'geos_union', 'geos_relate'] |
9 | 9 | |
10 | | from ctypes import c_char_p, c_double, c_int |
| 10 | from ctypes import c_double, c_int |
11 | 11 | from django.contrib.gis.geos.libgeos import GEOM_PTR, GEOS_PREPARE |
12 | 12 | from django.contrib.gis.geos.prototypes.errcheck import check_geom, check_string |
13 | 13 | from django.contrib.gis.geos.prototypes.geom import geos_char_p |
-
diff --git a/django/contrib/gis/geos/tests/test_geos.py b/django/contrib/gis/geos/tests/test_geos.py
index 4620a9f..f611dd4 100644
a
|
b
|
|
1 | | import ctypes, random, unittest, sys |
| 1 | import ctypes |
| 2 | import random |
| 3 | import unittest |
2 | 4 | from django.contrib.gis.geos import * |
3 | 5 | from django.contrib.gis.geos.base import gdal, numpy, GEOSBase |
4 | 6 | from django.contrib.gis.geos.libgeos import GEOS_PREPARE |
-
diff --git a/django/contrib/gis/geos/tests/test_geos_mutation.py b/django/contrib/gis/geos/tests/test_geos_mutation.py
index c8f7e65..0c69b2b 100644
a
|
b
|
|
2 | 2 | # Modified from original contribution by Aryeh Leib Taurog, which was |
3 | 3 | # released under the New BSD license. |
4 | 4 | |
5 | | import copy |
6 | 5 | from django.contrib.gis.geos import * |
7 | 6 | from django.contrib.gis.geos.error import GEOSIndexError |
8 | 7 | from django.utils import unittest |
-
diff --git a/django/contrib/gis/geos/tests/test_io.py b/django/contrib/gis/geos/tests/test_io.py
index cc0f1ed..50c3668 100644
a
|
b
|
|
1 | | import binascii, ctypes, unittest |
| 1 | import binascii |
| 2 | import unittest |
2 | 3 | from django.contrib.gis.geos import GEOSGeometry, WKTReader, WKTWriter, WKBReader, WKBWriter, geos_version_info |
3 | 4 | |
4 | 5 | class GEOSIOTest(unittest.TestCase): |
-
diff --git a/django/contrib/gis/management/commands/inspectdb.py b/django/contrib/gis/management/commands/inspectdb.py
index 937bb8e..bbf40e1 100644
a
|
b
|
|
1 | | from optparse import make_option |
2 | | |
3 | | from django.core.management.base import CommandError |
4 | 1 | from django.core.management.commands.inspectdb import Command as InspectDBCommand |
5 | 2 | |
6 | 3 | class Command(InspectDBCommand): |
-
diff --git a/django/contrib/gis/management/commands/ogrinspect.py b/django/contrib/gis/management/commands/ogrinspect.py
index a495787..13f1c0a 100644
a
|
b
|
|
1 | | import os, sys |
| 1 | import os |
2 | 2 | from optparse import make_option |
3 | 3 | from django.contrib.gis import gdal |
4 | 4 | from django.contrib.gis.management.base import ArgsCommand, CommandError |
-
diff --git a/django/contrib/gis/maps/google/gmap.py b/django/contrib/gis/maps/google/gmap.py
index cca5dc9..0c0703d 100644
a
|
b
|
|
1 | 1 | from django.conf import settings |
2 | | from django.contrib.gis import geos |
3 | 2 | from django.template.loader import render_to_string |
4 | 3 | from django.utils.safestring import mark_safe |
5 | 4 | |
6 | | class GoogleMapException(Exception): pass |
7 | | from django.contrib.gis.maps.google.overlays import GPolygon, GPolyline, GMarker, GIcon |
| 5 | class GoogleMapException(Exception): |
| 6 | pass |
| 7 | |
| 8 | from django.contrib.gis.maps.google.overlays import GPolygon, GPolyline, GMarker |
8 | 9 | |
9 | 10 | # The default Google Maps URL (for the API javascript) |
10 | 11 | # TODO: Internationalize for Japan, UK, etc. |
-
diff --git a/django/contrib/gis/maps/google/zoom.py b/django/contrib/gis/maps/google/zoom.py
index abc3fbf..7e7219f 100644
a
|
b
|
|
1 | 1 | from django.contrib.gis.geos import GEOSGeometry, LinearRing, Polygon, Point |
2 | 2 | from django.contrib.gis.maps.google.gmap import GoogleMapException |
3 | | from math import pi, sin, cos, log, exp, atan |
| 3 | from math import pi, sin, log, exp, atan |
4 | 4 | |
5 | 5 | # Constants used for degree to radian conversion, and vice-versa. |
6 | 6 | DTOR = pi / 180. |
-
diff --git a/django/contrib/gis/shortcuts.py b/django/contrib/gis/shortcuts.py
index a6fb892..1fba780 100644
a
|
b
|
|
1 | | import cStringIO, zipfile |
| 1 | try: |
| 2 | from cStringIO import StringIO |
| 3 | except ImportError: |
| 4 | from StringIO import StringIO |
| 5 | import zipfile |
2 | 6 | from django.conf import settings |
3 | 7 | from django.http import HttpResponse |
4 | 8 | from django.template import loader |
5 | 9 | |
6 | 10 | def compress_kml(kml): |
7 | 11 | "Returns compressed KMZ from the given KML string." |
8 | | kmz = cStringIO.StringIO() |
| 12 | kmz = StringIO() |
9 | 13 | zf = zipfile.ZipFile(kmz, 'a', zipfile.ZIP_DEFLATED) |
10 | 14 | zf.writestr('doc.kml', kml.encode(settings.DEFAULT_CHARSET)) |
11 | 15 | zf.close() |
-
diff --git a/django/contrib/gis/tests/distapp/tests.py b/django/contrib/gis/tests/distapp/tests.py
index 4f81a91..4961a02 100644
a
|
b
|
|
1 | | import os |
2 | | from decimal import Decimal |
3 | | |
4 | 1 | from django.db import connection |
5 | 2 | from django.db.models import Q |
6 | | from django.contrib.gis.geos import GEOSGeometry, Point, LineString |
| 3 | from django.contrib.gis.geos import GEOSGeometry, LineString |
7 | 4 | from django.contrib.gis.measure import D # alias for Distance |
8 | 5 | from django.contrib.gis.tests.utils import oracle, postgis, spatialite, no_oracle, no_spatialite |
9 | 6 | from django.test import TestCase |
10 | 7 | |
11 | | from models import AustraliaCity, Interstate, SouthTexasInterstate, \ |
12 | | SouthTexasCity, SouthTexasCityFt, CensusZipcode, SouthTexasZipcode |
| 8 | from models import (AustraliaCity, Interstate, SouthTexasInterstate, |
| 9 | SouthTexasCity, SouthTexasCityFt, CensusZipcode, SouthTexasZipcode) |
13 | 10 | |
14 | 11 | class DistanceTest(TestCase): |
15 | 12 | |
-
diff --git a/django/contrib/gis/tests/geo3d/tests.py b/django/contrib/gis/tests/geo3d/tests.py
index 324002e..be05964 100644
a
|
b
|
from django.contrib.gis.db.models import Union, Extent3D
|
5 | 5 | from django.contrib.gis.geos import GEOSGeometry, Point, Polygon |
6 | 6 | from django.contrib.gis.utils import LayerMapping, LayerMapError |
7 | 7 | |
8 | | from models import City3D, Interstate2D, Interstate3D, \ |
9 | | InterstateProj2D, InterstateProj3D, \ |
10 | | Point2D, Point3D, MultiPoint3D, Polygon2D, Polygon3D |
| 8 | from models import (City3D, Interstate2D, Interstate3D, |
| 9 | InterstateProj2D, InterstateProj3D, |
| 10 | Point2D, Point3D, MultiPoint3D, Polygon2D, Polygon3D) |
11 | 11 | |
12 | 12 | data_path = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', 'data')) |
13 | 13 | city_file = os.path.join(data_path, 'cities', 'cities.shp') |
-
diff --git a/django/contrib/gis/tests/geoapp/feeds.py b/django/contrib/gis/tests/geoapp/feeds.py
index 942b140..f2e8f73 100644
a
|
b
|
|
1 | 1 | from django.contrib.gis import feeds |
2 | | from django.contrib.gis.tests.utils import mysql |
3 | | from models import City, Country |
| 2 | from models import City |
4 | 3 | |
5 | 4 | class TestGeoRSS1(feeds.Feed): |
6 | 5 | link = '/city/' |
-
diff --git a/django/contrib/gis/tests/geoapp/test_regress.py b/django/contrib/gis/tests/geoapp/test_regress.py
index 0295526..d222194 100644
a
|
b
|
|
1 | | import os, unittest |
2 | | from django.contrib.gis.tests.utils import no_mysql, no_oracle, no_postgis, no_spatialite |
| 1 | import os |
| 2 | import unittest |
| 3 | from django.contrib.gis.tests.utils import no_mysql, no_spatialite |
3 | 4 | from django.contrib.gis.shortcuts import render_to_kmz |
4 | 5 | from models import City |
5 | 6 | |
-
diff --git a/django/contrib/gis/tests/geoapp/test_sitemaps.py b/django/contrib/gis/tests/geoapp/test_sitemaps.py
index 16e0433..a6f0c9b 100644
a
|
b
|
|
1 | | import cStringIO |
| 1 | try: |
| 2 | from cStringIO import StringIO |
| 3 | except ImportError: |
| 4 | from StringIO import StringIO |
2 | 5 | from xml.dom import minidom |
3 | 6 | import zipfile |
4 | 7 | from django.conf import settings |
… |
… |
class GeoSitemapTest(TestCase):
|
60 | 63 | kml_doc = minidom.parseString(self.client.get(kml_url).content) |
61 | 64 | elif kml_type == 'kmz': |
62 | 65 | # Have to decompress KMZ before parsing. |
63 | | buf = cStringIO.StringIO(self.client.get(kml_url).content) |
| 66 | buf = StringIO(self.client.get(kml_url).content) |
64 | 67 | zf = zipfile.ZipFile(buf) |
65 | 68 | self.assertEqual(1, len(zf.filelist)) |
66 | 69 | self.assertEqual('doc.kml', zf.filelist[0].filename) |
-
diff --git a/django/contrib/gis/tests/geoapp/tests.py b/django/contrib/gis/tests/geoapp/tests.py
index 296f128..2960aee 100644
a
|
b
|
|
1 | 1 | import re |
2 | 2 | from django.db import connection |
3 | 3 | from django.contrib.gis import gdal |
4 | | from django.contrib.gis.geos import fromstr, GEOSGeometry, \ |
5 | | Point, LineString, LinearRing, Polygon, GeometryCollection |
6 | | from django.contrib.gis.measure import Distance |
7 | | from django.contrib.gis.tests.utils import \ |
8 | | no_mysql, no_oracle, no_spatialite, \ |
9 | | mysql, oracle, postgis, spatialite |
| 4 | from django.contrib.gis.geos import (fromstr, GEOSGeometry, |
| 5 | Point, LineString, LinearRing, Polygon, GeometryCollection) |
| 6 | from django.contrib.gis.tests.utils import ( |
| 7 | no_mysql, no_oracle, no_spatialite, |
| 8 | mysql, oracle, postgis, spatialite) |
10 | 9 | from django.test import TestCase |
11 | 10 | |
12 | 11 | from models import Country, City, PennsylvaniaCity, State, Track |
-
diff --git a/django/contrib/gis/tests/geogapp/tests.py b/django/contrib/gis/tests/geogapp/tests.py
index cb69ce9..b3a86cd 100644
a
|
b
|
class GeographyTest(TestCase):
|
79 | 79 | |
80 | 80 | def test06_geography_area(self): |
81 | 81 | "Testing that Area calculations work on geography columns." |
82 | | from django.contrib.gis.measure import A |
83 | 82 | # SELECT ST_Area(poly) FROM geogapp_zipcode WHERE code='77002'; |
84 | 83 | ref_area = 5439084.70637573 |
85 | 84 | tol = 5 |
-
diff --git a/django/contrib/gis/tests/layermap/tests.py b/django/contrib/gis/tests/layermap/tests.py
index 2214840..0480e43 100644
a
|
b
|
from decimal import Decimal
|
4 | 4 | |
5 | 5 | from django.utils.unittest import TestCase |
6 | 6 | |
7 | | from django.contrib.gis.gdal import DataSource, OGRException |
| 7 | from django.contrib.gis.gdal import DataSource |
8 | 8 | from django.contrib.gis.tests.utils import mysql |
9 | 9 | from django.contrib.gis.utils.layermapping import LayerMapping, LayerMapError, InvalidDecimal, MissingForeignKey |
10 | 10 | |
11 | | from models import \ |
12 | | City, County, CountyFeat, Interstate, ICity1, ICity2, Invalid, State, \ |
13 | | city_mapping, co_mapping, cofeat_mapping, inter_mapping |
| 11 | from models import ( |
| 12 | City, County, CountyFeat, Interstate, ICity1, ICity2, Invalid, State, |
| 13 | city_mapping, co_mapping, cofeat_mapping, inter_mapping) |
14 | 14 | |
15 | 15 | shp_path = os.path.realpath(os.path.join(os.path.dirname(__file__), os.pardir, 'data')) |
16 | 16 | city_shp = os.path.join(shp_path, 'cities', 'cities.shp') |
-
diff --git a/django/contrib/gis/tests/test_geoip.py b/django/contrib/gis/tests/test_geoip.py
index a9ab6a6..c092437 100644
a
|
b
|
|
1 | | import os, unittest |
| 1 | import os |
| 2 | import unittest |
2 | 3 | from django.db import settings |
3 | 4 | from django.contrib.gis.geos import GEOSGeometry |
4 | 5 | from django.contrib.gis.utils import GeoIP, GeoIPException |
-
diff --git a/django/contrib/gis/tests/test_spatialrefsys.py b/django/contrib/gis/tests/test_spatialrefsys.py
index d9c8c38..608f645 100644
a
|
b
|
|
1 | 1 | from django.db import connection |
2 | 2 | from django.contrib.gis.gdal import GDAL_VERSION |
3 | | from django.contrib.gis.tests.utils import mysql, no_mysql, oracle, postgis, spatialite |
| 3 | from django.contrib.gis.tests.utils import no_mysql, oracle, postgis, spatialite |
4 | 4 | from django.utils import unittest |
5 | 5 | |
6 | 6 | |
-
diff --git a/django/contrib/gis/utils/geoip.py b/django/contrib/gis/utils/geoip.py
index eedaef9..29b949f 100644
a
|
b
|
|
38 | 38 | >>> g.geos('24.124.1.80').wkt |
39 | 39 | 'POINT (-95.2087020874023438 39.0392990112304688)' |
40 | 40 | """ |
41 | | import os, re |
| 41 | import os |
| 42 | import re |
42 | 43 | from ctypes import c_char_p, c_float, c_int, Structure, CDLL, POINTER |
43 | 44 | from ctypes.util import find_library |
44 | 45 | from django.conf import settings |
-
diff --git a/django/contrib/gis/utils/layermapping.py b/django/contrib/gis/utils/layermapping.py
index a970b07..d368112 100644
a
|
b
|
|
7 | 7 | http://geodjango.org/docs/layermapping.html |
8 | 8 | """ |
9 | 9 | import sys |
10 | | from datetime import date, datetime |
11 | 10 | from decimal import Decimal |
12 | 11 | from django.core.exceptions import ObjectDoesNotExist |
13 | 12 | from django.db import connections, DEFAULT_DB_ALIAS |
14 | 13 | from django.contrib.gis.db.models import GeometryField |
15 | | from django.contrib.gis.gdal import CoordTransform, DataSource, \ |
16 | | OGRException, OGRGeometry, OGRGeomType, SpatialReference |
17 | | from django.contrib.gis.gdal.field import \ |
18 | | OFTDate, OFTDateTime, OFTInteger, OFTReal, OFTString, OFTTime |
| 14 | from django.contrib.gis.gdal import (CoordTransform, DataSource, |
| 15 | OGRException, OGRGeometry, OGRGeomType, SpatialReference) |
| 16 | from django.contrib.gis.gdal.field import ( |
| 17 | OFTDate, OFTDateTime, OFTInteger, OFTReal, OFTString, OFTTime) |
19 | 18 | from django.db import models, transaction |
20 | 19 | from django.contrib.localflavor.us.models import USStateField |
21 | 20 | |
-
diff --git a/django/contrib/gis/utils/ogrinspect.py b/django/contrib/gis/utils/ogrinspect.py
index 145bd22..fe4443c 100644
a
|
b
|
Author: Travis Pinney, Dane Springmeyer, & Justin Bronn
|
8 | 8 | from itertools import izip |
9 | 9 | # Requires GDAL to use. |
10 | 10 | from django.contrib.gis.gdal import DataSource |
11 | | from django.contrib.gis.gdal.field import OFTDate, OFTDateTime, OFTInteger, OFTReal, OFTString, OFTTime |
| 11 | from django.contrib.gis.gdal.field import OFTDate, OFTDateTime, OFTInteger, OFTReal, OFTString |
12 | 12 | |
13 | 13 | def mapping(data_source, geom_name='geom', layer_key=0, multi_geom=False): |
14 | 14 | """ |
-
diff --git a/django/contrib/localflavor/ar/forms.py b/django/contrib/localflavor/ar/forms.py
index 57b5f8b..36b7530 100644
a
|
b
|
AR-specific Form helpers.
|
6 | 6 | from django.forms import ValidationError |
7 | 7 | from django.core.validators import EMPTY_VALUES |
8 | 8 | from django.forms.fields import RegexField, CharField, Select |
9 | | from django.utils.encoding import smart_unicode |
10 | 9 | from django.utils.translation import ugettext_lazy as _ |
11 | 10 | |
12 | 11 | class ARProvinceSelect(Select): |
-
diff --git a/django/contrib/localflavor/au/models.py b/django/contrib/localflavor/au/models.py
index e2b897e..ce4f120 100644
a
|
b
|
|
1 | | from django.conf import settings |
2 | 1 | from django.utils.translation import ugettext_lazy as _ |
3 | 2 | from django.db.models.fields import CharField |
4 | 3 | |
-
diff --git a/django/contrib/localflavor/be/forms.py b/django/contrib/localflavor/be/forms.py
index 6715e87..4e86d7e 100644
a
|
b
|
|
1 | 1 | """ |
2 | 2 | Belgium-specific Form helpers |
3 | 3 | """ |
4 | | import re |
5 | | |
6 | | from django.core.validators import EMPTY_VALUES |
7 | | from django.forms import ValidationError |
8 | 4 | from django.forms.fields import RegexField, Select |
9 | 5 | from django.utils.translation import ugettext_lazy as _ |
10 | 6 | |
-
diff --git a/django/contrib/localflavor/in_/forms.py b/django/contrib/localflavor/in_/forms.py
index c94c7e7..c09d257 100644
a
|
b
|
from django.forms import ValidationError
|
7 | 7 | from django.forms.fields import Field, RegexField, Select |
8 | 8 | from django.utils.encoding import smart_unicode |
9 | 9 | from django.utils.translation import gettext |
10 | | import re |
11 | 10 | |
12 | 11 | |
13 | 12 | class INZipCodeField(RegexField): |
-
diff --git a/django/contrib/localflavor/jp/forms.py b/django/contrib/localflavor/jp/forms.py
index 248a938..11dc6e8 100644
a
|
b
|
|
2 | 2 | JP-specific Form helpers |
3 | 3 | """ |
4 | 4 | |
5 | | from django.forms import ValidationError |
6 | 5 | from django.utils.translation import ugettext_lazy as _ |
7 | 6 | from django.forms.fields import RegexField, Select |
8 | 7 | |
-
diff --git a/django/contrib/localflavor/kw/forms.py b/django/contrib/localflavor/kw/forms.py
index 9429625..e671408 100644
a
|
b
|
from datetime import date
|
6 | 6 | |
7 | 7 | from django.core.validators import EMPTY_VALUES |
8 | 8 | from django.forms import ValidationError |
9 | | from django.forms.fields import Field, RegexField |
| 9 | from django.forms.fields import Field |
10 | 10 | from django.utils.translation import gettext as _ |
11 | 11 | |
12 | 12 | id_re = re.compile(r'^(?P<initial>\d{1})(?P<yy>\d\d)(?P<mm>\d\d)(?P<dd>\d\d)(?P<mid>\d{4})(?P<checksum>\d{1})') |
-
diff --git a/django/contrib/localflavor/no/forms.py b/django/contrib/localflavor/no/forms.py
index abe3b80..930cc17 100644
a
|
b
|
|
2 | 2 | Norwegian-specific Form helpers |
3 | 3 | """ |
4 | 4 | |
5 | | import re, datetime |
| 5 | import re |
| 6 | import datetime |
6 | 7 | from django.core.validators import EMPTY_VALUES |
7 | 8 | from django.forms import ValidationError |
8 | 9 | from django.forms.fields import Field, RegexField, Select |
-
diff --git a/django/contrib/localflavor/pt/forms.py b/django/contrib/localflavor/pt/forms.py
index 2a563cf..3de7376 100644
a
|
b
|
|
1 | 1 | """ |
2 | 2 | PT-specific Form helpers |
3 | 3 | """ |
| 4 | import re |
4 | 5 | |
5 | 6 | from django.core.validators import EMPTY_VALUES |
6 | 7 | from django.forms import ValidationError |
7 | | from django.forms.fields import Field, RegexField, Select |
| 8 | from django.forms.fields import Field, RegexField |
8 | 9 | from django.utils.encoding import smart_unicode |
9 | 10 | from django.utils.translation import ugettext_lazy as _ |
10 | | import re |
11 | 11 | |
12 | 12 | phone_digits_re = re.compile(r'^(\d{9}|(00|\+)\d*)$') |
13 | 13 | |
-
diff --git a/django/contrib/localflavor/ro/forms.py b/django/contrib/localflavor/ro/forms.py
index 3bfb0fa..1121f8e 100644
a
|
b
|
|
2 | 2 | """ |
3 | 3 | Romanian specific form helpers. |
4 | 4 | """ |
5 | | |
6 | | import re |
7 | | |
8 | 5 | from django.core.validators import EMPTY_VALUES |
9 | 6 | from django.forms import ValidationError, Field, RegexField, Select |
10 | 7 | from django.utils.translation import ugettext_lazy as _ |
-
diff --git a/django/contrib/localflavor/ru/forms.py b/django/contrib/localflavor/ru/forms.py
index d091eab..a8662b5 100644
a
|
b
|
Russian-specific forms helpers
|
3 | 3 | """ |
4 | 4 | import re |
5 | 5 | |
6 | | from django.core.validators import EMPTY_VALUES |
7 | | from django.forms import ValidationError |
8 | | from django.forms.fields import CharField, Select, RegexField |
| 6 | from django.forms.fields import RegexField, Select |
9 | 7 | from django.utils.translation import ugettext_lazy as _ |
10 | 8 | |
11 | 9 | phone_digits_re = re.compile(r'^(?:[78]-?)?(\d{3})[-\.]?(\d{3})[-\.]?(\d{4})$') |
-
diff --git a/django/contrib/localflavor/se/utils.py b/django/contrib/localflavor/se/utils.py
index 50d8ac1..5f65d8f 100644
a
|
b
|
|
1 | | import re |
2 | 1 | import datetime |
3 | 2 | |
4 | 3 | def id_number_checksum(gd): |
-
diff --git a/django/contrib/localflavor/us/models.py b/django/contrib/localflavor/us/models.py
index d5f7976..7cec205 100644
a
|
b
|
|
1 | | from django.conf import settings |
2 | 1 | from django.utils.translation import ugettext_lazy as _ |
3 | 2 | from django.db.models.fields import CharField |
4 | 3 | from django.contrib.localflavor.us.us_states import STATE_CHOICES |
-
diff --git a/django/contrib/localflavor/uy/forms.py b/django/contrib/localflavor/uy/forms.py
index 3f70cf3..2d90e52 100644
a
|
b
|
|
2 | 2 | """ |
3 | 3 | UY-specific form helpers. |
4 | 4 | """ |
5 | | import re |
6 | | |
7 | 5 | from django.core.validators import EMPTY_VALUES |
8 | 6 | from django.forms.fields import Select, RegexField |
9 | 7 | from django.forms import ValidationError |
-
diff --git a/django/contrib/messages/api.py b/django/contrib/messages/api.py
index 9880d7f..8e08655 100644
a
|
b
|
|
1 | 1 | from django.contrib.messages import constants |
2 | 2 | from django.contrib.messages.storage import default_storage |
3 | | from django.utils.functional import lazy, memoize |
4 | 3 | |
5 | 4 | __all__ = ( |
6 | 5 | 'add_message', 'get_messages', |
-
diff --git a/django/contrib/messages/storage/cookie.py b/django/contrib/messages/storage/cookie.py
index 45a20d0..c45dff4 100644
a
|
b
|
|
1 | 1 | from django.conf import settings |
2 | | from django.contrib.messages import constants |
3 | 2 | from django.contrib.messages.storage.base import BaseStorage, Message |
4 | 3 | from django.http import SimpleCookie |
5 | 4 | from django.utils import simplejson as json |
-
diff --git a/django/contrib/messages/tests/base.py b/django/contrib/messages/tests/base.py
index c6886a8..416d16c 100644
a
|
b
|
|
1 | | import warnings |
2 | | |
3 | 1 | from django import http |
4 | 2 | from django.test import TestCase |
5 | 3 | from django.conf import settings |
-
diff --git a/django/contrib/messages/tests/cookie.py b/django/contrib/messages/tests/cookie.py
index 95e1f99..f22ed39 100644
a
|
b
|
|
1 | 1 | from django.contrib.messages import constants |
2 | 2 | from django.contrib.messages.tests.base import BaseTest |
3 | | from django.contrib.messages.storage.cookie import CookieStorage, \ |
4 | | MessageEncoder, MessageDecoder |
| 3 | from django.contrib.messages.storage.cookie import (CookieStorage, |
| 4 | MessageEncoder, MessageDecoder) |
5 | 5 | from django.contrib.messages.storage.base import Message |
6 | 6 | from django.utils import simplejson as json |
7 | 7 | from django.conf import settings |
-
diff --git a/django/contrib/messages/tests/fallback.py b/django/contrib/messages/tests/fallback.py
index 9e4f657..0aa6500 100644
a
|
b
|
|
1 | 1 | from django.contrib.messages import constants |
2 | | from django.contrib.messages.storage.fallback import FallbackStorage, \ |
3 | | CookieStorage |
| 2 | from django.contrib.messages.storage.fallback import (FallbackStorage, |
| 3 | CookieStorage) |
4 | 4 | from django.contrib.messages.tests.base import BaseTest |
5 | | from django.contrib.messages.tests.cookie import set_cookie_data, \ |
6 | | stored_cookie_messages_count |
7 | | from django.contrib.messages.tests.session import set_session_data, \ |
8 | | stored_session_messages_count |
| 5 | from django.contrib.messages.tests.cookie import (set_cookie_data, |
| 6 | stored_cookie_messages_count) |
| 7 | from django.contrib.messages.tests.session import (set_session_data, |
| 8 | stored_session_messages_count) |
9 | 9 | |
10 | 10 | |
11 | 11 | class FallbackTest(BaseTest): |
-
diff --git a/django/contrib/messages/tests/urls.py b/django/contrib/messages/tests/urls.py
index 5191f34..263b0a8 100644
a
|
b
|
from django.conf.urls.defaults import *
|
2 | 2 | from django.contrib import messages |
3 | 3 | from django.core.urlresolvers import reverse |
4 | 4 | from django.http import HttpResponseRedirect, HttpResponse |
5 | | from django.shortcuts import render_to_response, redirect |
6 | 5 | from django.template import RequestContext, Template |
7 | 6 | from django.template.response import TemplateResponse |
8 | 7 | from django.views.decorators.cache import never_cache |
-
diff --git a/django/contrib/sessions/backends/base.py b/django/contrib/sessions/backends/base.py
index 1c7c188..050ed7b 100644
a
|
b
|
import base64
|
2 | 2 | import hashlib |
3 | 3 | import os |
4 | 4 | import random |
5 | | import sys |
6 | 5 | import time |
7 | 6 | from datetime import datetime, timedelta |
8 | 7 | try: |
-
diff --git a/django/contrib/sessions/backends/db.py b/django/contrib/sessions/backends/db.py
index 9a53790..220046f 100644
a
|
b
|
|
1 | 1 | import datetime |
2 | | from django.conf import settings |
3 | 2 | from django.contrib.sessions.backends.base import SessionBase, CreateError |
4 | 3 | from django.core.exceptions import SuspiciousOperation |
5 | 4 | from django.db import IntegrityError, transaction, router |
-
diff --git a/django/contrib/sessions/models.py b/django/contrib/sessions/models.py
index 1d82a99..0179c35 100644
a
|
b
|
|
1 | | import base64 |
2 | | import cPickle as pickle |
3 | | |
4 | 1 | from django.db import models |
5 | 2 | from django.utils.translation import ugettext_lazy as _ |
6 | 3 | |
-
diff --git a/django/contrib/sitemaps/__init__.py b/django/contrib/sitemaps/__init__.py
index 6b8d5a0..a225b77 100644
a
|
b
|
|
1 | | from django.contrib.sites.models import Site, get_current_site |
| 1 | from django.contrib.sites.models import Site |
2 | 2 | from django.core import urlresolvers, paginator |
3 | 3 | from django.core.exceptions import ImproperlyConfigured |
4 | 4 | import urllib |
-
diff --git a/django/core/cache/backends/base.py b/django/core/cache/backends/base.py
index 513adb4..f7573b2 100644
a
|
b
|
|
2 | 2 | |
3 | 3 | import warnings |
4 | 4 | |
5 | | from django.conf import settings |
6 | 5 | from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning |
7 | 6 | from django.utils.encoding import smart_str |
8 | 7 | from django.utils.importlib import import_module |
-
diff --git a/django/core/cache/backends/db.py b/django/core/cache/backends/db.py
index 495812a..b4743af 100644
a
|
b
|
|
2 | 2 | |
3 | 3 | from django.core.cache.backends.base import BaseCache |
4 | 4 | from django.db import connections, router, transaction, DatabaseError |
5 | | import base64, time |
| 5 | import base64 |
6 | 6 | from datetime import datetime |
7 | 7 | try: |
8 | 8 | import cPickle as pickle |
9 | 9 | except ImportError: |
10 | 10 | import pickle |
| 11 | import time |
11 | 12 | |
12 | 13 | class Options(object): |
13 | 14 | """A class that will quack like a Django model _meta class. |
-
diff --git a/django/core/cache/backends/memcached.py b/django/core/cache/backends/memcached.py
index e452498..1e1d97e 100644
a
|
b
|
import time
|
4 | 4 | from threading import local |
5 | 5 | |
6 | 6 | from django.core.cache.backends.base import BaseCache, InvalidCacheBackendError |
7 | | from django.utils import importlib |
8 | 7 | |
9 | 8 | class BaseMemcachedCache(BaseCache): |
10 | 9 | def __init__(self, server, params, library, value_not_found_exception): |
-
diff --git a/django/core/handlers/modpython.py b/django/core/handlers/modpython.py
index 5affea4..eba9dd3 100644
a
|
b
|
|
1 | 1 | import os |
2 | | from pprint import pformat |
3 | 2 | import sys |
4 | 3 | from warnings import warn |
5 | 4 | |
… |
… |
from django.core import signals
|
8 | 7 | from django.core.handlers.base import BaseHandler |
9 | 8 | from django.core.urlresolvers import set_script_prefix |
10 | 9 | from django.utils import datastructures |
11 | | from django.utils.encoding import force_unicode, smart_str, iri_to_uri |
| 10 | from django.utils.encoding import force_unicode, iri_to_uri |
12 | 11 | from django.utils.log import getLogger |
13 | 12 | |
14 | 13 | logger = getLogger('django.request') |
-
diff --git a/django/core/handlers/profiler-hotshot.py b/django/core/handlers/profiler-hotshot.py
index 6cf94b0..0522de6 100644
a
|
b
|
|
1 | | import hotshot, time, os |
| 1 | import hotshot |
| 2 | import os |
| 3 | import time |
| 4 | |
2 | 5 | from django.core.handlers.modpython import ModPythonHandler |
3 | 6 | |
4 | 7 | PROFILE_DATA_DIR = "/var/log/cmsprofile" |
-
diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py
index 2acb3b1..d288581 100644
a
|
b
|
|
1 | | from pprint import pformat |
2 | 1 | import sys |
3 | 2 | from threading import Lock |
4 | 3 | try: |
-
diff --git a/django/core/mail/__init__.py b/django/core/mail/__init__.py
index 2c71b11..f363fc5 100644
a
|
b
|
from django.utils.importlib import import_module
|
11 | 11 | # django/core/mail.py before the introduction of email |
12 | 12 | # backends and the subsequent reorganization (See #10355) |
13 | 13 | from django.core.mail.utils import CachedDnsName, DNS_NAME |
14 | | from django.core.mail.message import \ |
15 | | EmailMessage, EmailMultiAlternatives, \ |
16 | | SafeMIMEText, SafeMIMEMultipart, \ |
17 | | DEFAULT_ATTACHMENT_MIME_TYPE, make_msgid, \ |
18 | | BadHeaderError, forbid_multi_line_headers |
| 14 | from django.core.mail.message import ( |
| 15 | EmailMessage, EmailMultiAlternatives, |
| 16 | SafeMIMEText, SafeMIMEMultipart, |
| 17 | DEFAULT_ATTACHMENT_MIME_TYPE, make_msgid, |
| 18 | BadHeaderError, forbid_multi_line_headers) |
19 | 19 | from django.core.mail.backends.smtp import EmailBackend as _SMTPConnection |
20 | 20 | |
21 | 21 | def get_connection(backend=None, fail_silently=False, **kwds): |
-
diff --git a/django/core/management/commands/reset.py b/django/core/management/commands/reset.py
index 8aa7e88..9539212 100644
a
|
b
|
|
1 | 1 | from optparse import make_option |
2 | 2 | |
3 | | from django.conf import settings |
4 | 3 | from django.core.management.base import AppCommand, CommandError |
5 | 4 | from django.core.management.color import no_style |
6 | 5 | from django.core.management.sql import sql_reset |
-
diff --git a/django/core/serializers/base.py b/django/core/serializers/base.py
index 6afaf21..ffc869c 100644
a
|
b
|
Module for abstract serializer/unserializer base classes.
|
5 | 5 | from StringIO import StringIO |
6 | 6 | |
7 | 7 | from django.db import models |
8 | | from django.utils.encoding import smart_str, smart_unicode |
9 | | from django.utils import datetime_safe |
| 8 | from django.utils.encoding import smart_unicode |
10 | 9 | |
11 | 10 | class SerializerDoesNotExist(KeyError): |
12 | 11 | """The requested serializer was not found.""" |
-
diff --git a/django/core/servers/fastcgi.py b/django/core/servers/fastcgi.py
index 7e724c2..9f80d2b 100644
a
|
b
|
Run with the extra option "help" for a list of additional options you can
|
12 | 12 | pass to this server. |
13 | 13 | """ |
14 | 14 | |
| 15 | import os |
| 16 | import sys |
15 | 17 | from django.utils import importlib |
16 | | import sys, os |
17 | 18 | |
18 | 19 | __version__ = "0.1" |
19 | 20 | __all__ = ["runfastcgi"] |
-
diff --git a/django/db/__init__.py b/django/db/__init__.py
index 2148cf0..8395468 100644
a
|
b
|
|
1 | 1 | from django.conf import settings |
2 | 2 | from django.core import signals |
3 | 3 | from django.core.exceptions import ImproperlyConfigured |
4 | | from django.db.utils import ConnectionHandler, ConnectionRouter, load_backend, DEFAULT_DB_ALIAS, \ |
5 | | DatabaseError, IntegrityError |
| 4 | from django.db.utils import (ConnectionHandler, ConnectionRouter, |
| 5 | load_backend, DEFAULT_DB_ALIAS, DatabaseError, IntegrityError) |
6 | 6 | |
7 | 7 | __all__ = ('backend', 'connection', 'connections', 'router', 'DatabaseError', |
8 | 8 | 'IntegrityError', 'DEFAULT_DB_ALIAS') |
-
diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py
index b64fb01..1c3bc7e 100644
a
|
b
|
|
1 | | import decimal |
2 | 1 | try: |
3 | 2 | import thread |
4 | 3 | except ImportError: |
-
diff --git a/django/db/backends/dummy/base.py b/django/db/backends/dummy/base.py
index 7de48c8..a2aef52 100644
a
|
b
|
Each of these API functions, except connection.close(), raises
|
7 | 7 | ImproperlyConfigured. |
8 | 8 | """ |
9 | 9 | |
| 10 | import decimal |
| 11 | |
10 | 12 | from django.core.exceptions import ImproperlyConfigured |
11 | 13 | from django.db.backends import * |
12 | 14 | from django.db.backends.creation import BaseDatabaseCreation |
-
diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py
index 6d02aa7..3338690 100644
a
|
b
|
MySQL database backend for Django.
|
4 | 4 | Requires MySQLdb: http://sourceforge.net/projects/mysql-python |
5 | 5 | """ |
6 | 6 | |
| 7 | import decimal |
7 | 8 | import re |
8 | 9 | import sys |
9 | 10 | |
-
diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py
index 42de0dd..930b1bb 100644
a
|
b
|
Requires cx_Oracle: http://cx-oracle.sourceforge.net/
|
6 | 6 | |
7 | 7 | |
8 | 8 | import datetime |
9 | | from decimal import Decimal |
| 9 | import decimal |
10 | 10 | import sys |
11 | 11 | |
12 | 12 | |
… |
… |
def _rowfactory(row, cursor):
|
730 | 730 | # This will normally be an integer from a sequence, |
731 | 731 | # but it could be a decimal value. |
732 | 732 | if '.' in value: |
733 | | value = Decimal(value) |
| 733 | value = decimal.Decimal(value) |
734 | 734 | else: |
735 | 735 | value = int(value) |
736 | 736 | else: |
… |
… |
def _rowfactory(row, cursor):
|
743 | 743 | if scale == 0: |
744 | 744 | value = int(value) |
745 | 745 | else: |
746 | | value = Decimal(value) |
| 746 | value = decimal.Decimal(value) |
747 | 747 | elif '.' in value: |
748 | 748 | # No type information. This normally comes from a |
749 | 749 | # mathematical expression in the SELECT list. Guess int |
750 | 750 | # or Decimal based on whether it has a decimal point. |
751 | | value = Decimal(value) |
| 751 | value = decimal.Decimal(value) |
752 | 752 | else: |
753 | 753 | value = int(value) |
754 | 754 | elif desc[1] in (Database.STRING, Database.FIXED_CHAR, |
-
diff --git a/django/db/backends/oracle/creation.py b/django/db/backends/oracle/creation.py
index 0403e0a..893b5dd 100644
a
|
b
|
|
1 | | import sys, time |
| 1 | import sys |
| 2 | import time |
2 | 3 | from django.db.backends.creation import BaseDatabaseCreation |
3 | 4 | |
4 | 5 | TEST_DATABASE_PREFIX = 'test_' |
-
diff --git a/django/db/backends/postgresql_psycopg2/base.py b/django/db/backends/postgresql_psycopg2/base.py
index 67e2877..122ec78 100644
a
|
b
|
PostgreSQL database backend for Django.
|
3 | 3 | |
4 | 4 | Requires psycopg 2: http://initd.org/projects/psycopg2 |
5 | 5 | """ |
6 | | |
7 | 6 | import sys |
8 | 7 | |
9 | 8 | from django.db import utils |
-
diff --git a/django/db/backends/postgresql_psycopg2/operations.py b/django/db/backends/postgresql_psycopg2/operations.py
index 3315913..3376ca8 100644
a
|
b
|
|
1 | | import re |
2 | | |
3 | 1 | from django.db.backends import BaseDatabaseOperations |
4 | 2 | |
5 | 3 | |
-
diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py
index 5b4a1c2..79c5ede 100644
a
|
b
|
Works with either the pysqlite2 module or the sqlite3 module in the
|
5 | 5 | standard library. |
6 | 6 | """ |
7 | 7 | |
| 8 | import datetime |
| 9 | import decimal |
8 | 10 | import re |
9 | 11 | import sys |
10 | | import datetime |
11 | 12 | |
12 | 13 | from django.db import utils |
13 | 14 | from django.db.backends import * |
-
diff --git a/django/db/models/base.py b/django/db/models/base.py
index 31310ea..14f6ee7 100644
a
|
b
|
|
1 | 1 | import copy |
2 | 2 | import sys |
3 | | import types |
4 | 3 | from functools import update_wrapper |
5 | 4 | from itertools import izip |
6 | 5 | |
… |
… |
import django.db.models.manager # Imported to register signal handler.
|
8 | 7 | from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned, FieldError, ValidationError, NON_FIELD_ERRORS |
9 | 8 | from django.core import validators |
10 | 9 | from django.db.models.fields import AutoField, FieldDoesNotExist |
11 | | from django.db.models.fields.related import (OneToOneRel, ManyToOneRel, |
12 | | OneToOneField, add_lazy_relation) |
| 10 | from django.db.models.fields.related import ManyToOneRel, OneToOneField, add_lazy_relation |
13 | 11 | from django.db.models.query import Q |
14 | 12 | from django.db.models.query_utils import DeferredAttribute |
15 | 13 | from django.db.models.deletion import Collector |
-
diff --git a/django/db/models/deletion.py b/django/db/models/deletion.py
index 310e3af..e165346 100644
a
|
b
|
from operator import attrgetter
|
3 | 3 | |
4 | 4 | from django.db import connections, transaction, IntegrityError |
5 | 5 | from django.db.models import signals, sql |
6 | | from django.db.models.sql.constants import GET_ITERATOR_CHUNK_SIZE |
7 | 6 | from django.utils.datastructures import SortedDict |
8 | 7 | |
9 | 8 | |
-
diff --git a/django/db/models/fields/files.py b/django/db/models/fields/files.py
index 50dc236..d0dbf23 100644
a
|
b
|
|
1 | 1 | import datetime |
2 | 2 | import os |
3 | 3 | |
4 | | from django.conf import settings |
| 4 | from django import forms |
5 | 5 | from django.db.models.fields import Field |
6 | | from django.core.files.base import File, ContentFile |
| 6 | from django.core.files.base import File |
7 | 7 | from django.core.files.storage import default_storage |
8 | | from django.core.files.images import ImageFile, get_image_dimensions |
9 | | from django.core.files.uploadedfile import UploadedFile |
10 | | from django.utils.functional import curry |
| 8 | from django.core.files.images import ImageFile |
11 | 9 | from django.db.models import signals |
12 | 10 | from django.utils.encoding import force_unicode, smart_str |
13 | | from django.utils.translation import ugettext_lazy, ugettext as _ |
14 | | from django import forms |
15 | | from django.db.models.loading import cache |
| 11 | from django.utils.translation import ugettext_lazy as _ |
16 | 12 | |
17 | 13 | class FieldFile(File): |
18 | 14 | def __init__(self, instance, field, name): |
… |
… |
class FileField(Field):
|
215 | 211 | # The descriptor to use for accessing the attribute off of the class. |
216 | 212 | descriptor_class = FileDescriptor |
217 | 213 | |
218 | | description = ugettext_lazy("File path") |
| 214 | description = _("File path") |
219 | 215 | |
220 | 216 | def __init__(self, verbose_name=None, name=None, upload_to='', storage=None, **kwargs): |
221 | 217 | for arg in ('primary_key', 'unique'): |
… |
… |
class ImageFieldFile(ImageFile, FieldFile):
|
321 | 317 | class ImageField(FileField): |
322 | 318 | attr_class = ImageFieldFile |
323 | 319 | descriptor_class = ImageFileDescriptor |
324 | | description = ugettext_lazy("File path") |
| 320 | description = _("File path") |
325 | 321 | |
326 | 322 | def __init__(self, verbose_name=None, name=None, width_field=None, height_field=None, **kwargs): |
327 | 323 | self.width_field, self.height_field = width_field, height_field |
-
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py
index cedf308..e7f4b9b 100644
a
|
b
|
|
1 | | from django.conf import settings |
2 | | from django.db import connection, router, transaction |
| 1 | from django.db import connection, router |
3 | 2 | from django.db.backends import util |
4 | 3 | from django.db.models import signals, get_model |
5 | 4 | from django.db.models.fields import (AutoField, Field, IntegerField, |
… |
… |
from django.db.models.query import QuerySet
|
9 | 8 | from django.db.models.query_utils import QueryWrapper |
10 | 9 | from django.db.models.deletion import CASCADE |
11 | 10 | from django.utils.encoding import smart_unicode |
12 | | from django.utils.translation import (ugettext_lazy as _, string_concat, |
13 | | ungettext, ugettext) |
| 11 | from django.utils.translation import ugettext_lazy as _, string_concat |
14 | 12 | from django.utils.functional import curry |
15 | 13 | from django.core import exceptions |
16 | 14 | from django import forms |
-
diff --git a/django/db/models/loading.py b/django/db/models/loading.py
index 2c35fdb..03cdcc2 100644
a
|
b
|
from django.utils.datastructures import SortedDict
|
6 | 6 | from django.utils.importlib import import_module |
7 | 7 | from django.utils.module_loading import module_has_submodule |
8 | 8 | |
9 | | import imp |
10 | 9 | import sys |
11 | 10 | import os |
12 | 11 | import threading |
-
diff --git a/django/db/models/manager.py b/django/db/models/manager.py
index 4fa4c4a..bdd86bb 100644
a
|
b
|
|
1 | 1 | import copy |
2 | | from django.conf import settings |
3 | 2 | from django.db import router |
4 | 3 | from django.db.models.query import QuerySet, EmptyQuerySet, insert_query, RawQuerySet |
5 | 4 | from django.db.models import signals |
-
diff --git a/django/db/models/query.py b/django/db/models/query.py
index 6a6a829..c719d13 100644
a
|
b
|
The main QuerySet implementation. This provides the public API for the ORM.
|
3 | 3 | """ |
4 | 4 | |
5 | 5 | import copy |
6 | | from itertools import izip |
7 | 6 | |
8 | 7 | from django.db import connections, router, transaction, IntegrityError |
9 | | from django.db.models.aggregates import Aggregate |
10 | | from django.db.models.fields import DateField |
11 | 8 | from django.db.models.query_utils import (Q, select_related_descend, |
12 | 9 | deferred_class_factory, InvalidQuery) |
13 | 10 | from django.db.models.deletion import Collector |
14 | | from django.db.models import signals, sql |
| 11 | from django.db.models import sql |
15 | 12 | |
16 | 13 | # Used to control how many objects are worked with at once in some cases (e.g. |
17 | 14 | # when deleting objects). |
-
diff --git a/django/db/models/query_utils.py b/django/db/models/query_utils.py
index 69b19f1..a56ab5c 100644
a
|
b
|
import weakref
|
10 | 10 | |
11 | 11 | from django.db.backends import util |
12 | 12 | from django.utils import tree |
13 | | from django.utils.datastructures import SortedDict |
14 | 13 | |
15 | 14 | |
16 | 15 | class InvalidQuery(Exception): |
-
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py
index 841ec12..b4502d8 100644
a
|
b
|
from django.db.backends.util import truncate_name
|
5 | 5 | from django.db.models.sql.constants import * |
6 | 6 | from django.db.models.sql.datastructures import EmptyResultSet |
7 | 7 | from django.db.models.sql.expressions import SQLEvaluator |
8 | | from django.db.models.sql.query import get_proxied_model, get_order_dir, \ |
9 | | select_related_descend, Query |
| 8 | from django.db.models.sql.query import (get_proxied_model, get_order_dir, |
| 9 | select_related_descend, Query) |
10 | 10 | from django.db.utils import DatabaseError |
11 | 11 | |
12 | 12 | class SQLCompiler(object): |
-
diff --git a/django/db/models/sql/subqueries.py b/django/db/models/sql/subqueries.py
index 003bf43..ecde857 100644
a
|
b
|
Query subclasses which provide extra functionality beyond simple data retrieval.
|
3 | 3 | """ |
4 | 4 | |
5 | 5 | from django.core.exceptions import FieldError |
6 | | from django.db import connections |
7 | 6 | from django.db.models.fields import DateField, FieldDoesNotExist |
8 | 7 | from django.db.models.sql.constants import * |
9 | 8 | from django.db.models.sql.datastructures import Date |
10 | | from django.db.models.sql.expressions import SQLEvaluator |
11 | 9 | from django.db.models.sql.query import Query |
12 | 10 | from django.db.models.sql.where import AND, Constraint |
13 | 11 | |
-
diff --git a/django/db/models/sql/where.py b/django/db/models/sql/where.py
index 2427a52..3e9dbf0 100644
a
|
b
|
from itertools import repeat
|
6 | 6 | |
7 | 7 | from django.utils import tree |
8 | 8 | from django.db.models.fields import Field |
9 | | from django.db.models.query_utils import QueryWrapper |
10 | 9 | from datastructures import EmptyResultSet, FullResultSet |
11 | 10 | |
12 | 11 | # Connection types |
-
diff --git a/django/db/transaction.py b/django/db/transaction.py
index 104243a..4ecd2d1 100644
a
|
b
|
or implicit commits or rollbacks.
|
13 | 13 | """ |
14 | 14 | from __future__ import with_statement |
15 | 15 | |
16 | | import sys |
17 | 16 | from functools import wraps |
18 | 17 | |
19 | | from django.conf import settings |
20 | 18 | from django.db import connections, DEFAULT_DB_ALIAS |
21 | 19 | |
22 | 20 | |
-
diff --git a/django/dispatch/saferef.py b/django/dispatch/saferef.py
index f446447..1c7d164 100644
a
|
b
|
Provides a way to safely weakref any function, including bound methods (which
|
5 | 5 | aren't handled by the core weakref module). |
6 | 6 | """ |
7 | 7 | |
8 | | import weakref, traceback |
| 8 | import traceback |
| 9 | import weakref |
9 | 10 | |
10 | 11 | def safeRef(target, onDelete = None): |
11 | 12 | """Return a *safe* weak reference to a callable target |
-
diff --git a/django/forms/extras/widgets.py b/django/forms/extras/widgets.py
index d75e903..5145578 100644
a
|
b
|
|
2 | 2 | Extra HTML Widget classes |
3 | 3 | """ |
4 | 4 | |
5 | | import time |
6 | 5 | import datetime |
7 | 6 | import re |
8 | 7 | |
-
diff --git a/django/forms/models.py b/django/forms/models.py
index b34f4d0..45e8d69 100644
a
|
b
|
from django.utils.datastructures import SortedDict
|
8 | 8 | from django.utils.text import get_text_list, capfirst |
9 | 9 | from django.utils.translation import ugettext_lazy as _, ugettext |
10 | 10 | |
11 | | from django.core.exceptions import ValidationError, NON_FIELD_ERRORS, \ |
12 | | FieldError |
| 11 | from django.core.exceptions import ValidationError, NON_FIELD_ERRORS, FieldError |
13 | 12 | from django.core.validators import EMPTY_VALUES |
14 | 13 | from util import ErrorList |
15 | 14 | from forms import BaseForm, get_declared_fields |
-
diff --git a/django/middleware/http.py b/django/middleware/http.py
index e98858f..86e46ce 100644
a
|
b
|
|
1 | | from django.core.exceptions import MiddlewareNotUsed |
2 | 1 | from django.utils.http import http_date, parse_http_date_safe |
3 | 2 | |
4 | 3 | class ConditionalGetMiddleware(object): |
-
diff --git a/django/template/base.py b/django/template/base.py
index b96e446..9a7f55f 100644
a
|
b
|
|
1 | | import imp |
2 | 1 | import re |
3 | 2 | from functools import partial |
4 | 3 | from inspect import getargspec |
… |
… |
from django.conf import settings
|
7 | 6 | from django.template.context import Context, RequestContext, ContextPopException |
8 | 7 | from django.utils.importlib import import_module |
9 | 8 | from django.utils.itercompat import is_iterable |
10 | | from django.utils.functional import Promise |
11 | 9 | from django.utils.text import smart_split, unescape_string_literal, get_text_list |
12 | 10 | from django.utils.encoding import smart_unicode, force_unicode, smart_str |
13 | 11 | from django.utils.translation import ugettext_lazy |
-
diff --git a/django/template/context.py b/django/template/context.py
index cb1c708..8f70d70 100644
a
|
b
|
|
1 | 1 | from copy import copy |
2 | 2 | from django.core.exceptions import ImproperlyConfigured |
3 | 3 | from django.utils.importlib import import_module |
4 | | from django.http import HttpRequest |
5 | 4 | |
6 | 5 | # Cache of actual callables. |
7 | 6 | _standard_context_processors = None |
-
diff --git a/django/template/debug.py b/django/template/debug.py
index a9e3c4f..bf2a53b 100644
a
|
b
|
|
1 | | from django.conf import settings |
2 | 1 | from django.template.base import Lexer, Parser, tag_re, NodeList, VariableNode, TemplateSyntaxError |
3 | 2 | from django.utils.encoding import force_unicode |
4 | 3 | from django.utils.html import escape |
-
diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py
index 1eceaf4..df74b61 100644
a
|
b
|
import re
|
5 | 5 | from datetime import datetime |
6 | 6 | from itertools import groupby, cycle as itertools_cycle |
7 | 7 | |
8 | | from django.template.base import Node, NodeList, Template, Context, Variable |
9 | | from django.template.base import TemplateSyntaxError, VariableDoesNotExist, BLOCK_TAG_START, BLOCK_TAG_END, VARIABLE_TAG_START, VARIABLE_TAG_END, SINGLE_BRACE_START, SINGLE_BRACE_END, COMMENT_TAG_START, COMMENT_TAG_END |
| 8 | from django.template.base import Node, NodeList, Template |
| 9 | from django.template.base import (TemplateSyntaxError, VariableDoesNotExist, |
| 10 | BLOCK_TAG_START, BLOCK_TAG_END, |
| 11 | VARIABLE_TAG_START, VARIABLE_TAG_END, |
| 12 | SINGLE_BRACE_START, SINGLE_BRACE_END, |
| 13 | COMMENT_TAG_START, COMMENT_TAG_END) |
10 | 14 | from django.template.base import get_library, Library, InvalidTemplateLibrary |
11 | 15 | from django.template.smartif import IfParser, Literal |
12 | 16 | from django.template.defaultfilters import date |
-
diff --git a/django/template/loader_tags.py b/django/template/loader_tags.py
index f5cac33..3e2fb1b 100644
a
|
b
|
|
1 | | from django.template.base import TemplateSyntaxError, TemplateDoesNotExist, Variable |
2 | | from django.template.base import Library, Node, TextNode |
3 | | from django.template.context import Context |
| 1 | from django.template.base import TemplateSyntaxError, Library, Node, TextNode |
4 | 2 | from django.template.defaulttags import token_kwargs |
5 | 3 | from django.template.loader import get_template |
6 | 4 | from django.conf import settings |
-
diff --git a/django/template/loaders/cached.py b/django/template/loaders/cached.py
index 5b351ad..3ed9cf3 100644
a
|
b
|
to load templates from them in order, caching the result.
|
4 | 4 | """ |
5 | 5 | |
6 | 6 | import hashlib |
7 | | from django.core.exceptions import ImproperlyConfigured |
8 | 7 | from django.template.base import TemplateDoesNotExist |
9 | 8 | from django.template.loader import BaseLoader, get_template_from_string, find_template_loader, make_origin |
10 | | from django.utils.importlib import import_module |
11 | 9 | |
12 | 10 | class Loader(BaseLoader): |
13 | 11 | is_usable = True |
-
diff --git a/django/template/smartif.py b/django/template/smartif.py
index e835e0f..54d74b4 100644
a
|
b
|
|
1 | 1 | """ |
2 | 2 | Parser and utilities for the smart 'if' tag |
3 | 3 | """ |
4 | | import operator |
5 | 4 | |
6 | 5 | # Using a simple top down parser, as described here: |
7 | 6 | # http://effbot.org/zone/simple-top-down-parsing.htm. |
-
diff --git a/django/templatetags/cache.py b/django/templatetags/cache.py
index 495623d..8183452 100644
a
|
b
|
import hashlib
|
2 | 2 | from django.template import Library, Node, TemplateSyntaxError, Variable, VariableDoesNotExist |
3 | 3 | from django.template import resolve_variable |
4 | 4 | from django.core.cache import cache |
5 | | from django.utils.encoding import force_unicode |
6 | 5 | from django.utils.http import urlquote |
7 | 6 | |
8 | 7 | register = Library() |
-
diff --git a/django/templatetags/future.py b/django/templatetags/future.py
index 3d98879..248c865 100644
a
|
b
|
|
1 | | from django.conf import settings |
2 | | from django.template import Library, Node, Template, TemplateSyntaxError |
3 | | from django.template.defaulttags import kwarg_re, include_is_allowed, SsiNode, URLNode |
4 | | from django.utils.encoding import smart_str |
| 1 | from django.template import Library, TemplateSyntaxError |
| 2 | from django.template.defaulttags import kwarg_re, SsiNode, URLNode |
5 | 3 | |
6 | 4 | |
7 | 5 | register = Library() |
-
diff --git a/django/templatetags/i18n.py b/django/templatetags/i18n.py
index 1782136..492e763 100644
a
|
b
|
|
1 | 1 | import re |
2 | 2 | |
3 | | from django.template import Node, Variable, VariableNode |
| 3 | from django.template import Node, Variable |
4 | 4 | from django.template import TemplateSyntaxError, TokenParser, Library |
5 | 5 | from django.template import TOKEN_TEXT, TOKEN_VAR |
6 | 6 | from django.template.base import _render_value_in_context |
7 | 7 | from django.utils import translation |
8 | | from django.utils.encoding import force_unicode |
9 | 8 | from django.template.defaulttags import token_kwargs |
10 | 9 | |
11 | 10 | register = Library() |
-
diff --git a/django/templatetags/l10n.py b/django/templatetags/l10n.py
index 5191e69..12cf136 100644
a
|
b
|
|
1 | | from django.conf import settings |
2 | 1 | from django.template import Node |
3 | 2 | from django.template import TemplateSyntaxError, Library |
4 | 3 | from django.utils import formats |
-
diff --git a/django/test/client.py b/django/test/client.py
index 4335f21..10d8727 100644
a
|
b
|
import re
|
5 | 5 | import mimetypes |
6 | 6 | import warnings |
7 | 7 | from copy import copy |
8 | | from urlparse import urlparse, urlunparse, urlsplit |
| 8 | from urlparse import urlparse, urlsplit |
9 | 9 | try: |
10 | 10 | from cStringIO import StringIO |
11 | 11 | except ImportError: |
… |
… |
from django.utils.encoding import smart_str
|
24 | 24 | from django.utils.http import urlencode |
25 | 25 | from django.utils.importlib import import_module |
26 | 26 | from django.utils.itercompat import is_iterable |
27 | | from django.db import transaction, close_connection |
| 27 | from django.db import close_connection |
28 | 28 | from django.test.utils import ContextList |
29 | 29 | |
30 | 30 | __all__ = ('Client', 'RequestFactory', 'encode_file', 'encode_multipart') |
-
diff --git a/django/test/testcases.py b/django/test/testcases.py
index 02717ff..e767712 100644
a
|
b
|
from functools import wraps
|
6 | 6 | from urlparse import urlsplit, urlunsplit |
7 | 7 | from xml.dom.minidom import parseString, Node |
8 | 8 | |
9 | | from django.conf import settings, UserSettingsHolder |
| 9 | from django.conf import settings |
10 | 10 | from django.core import mail |
11 | 11 | from django.core.management import call_command |
12 | 12 | from django.core.signals import request_started |
-
diff --git a/django/test/utils.py b/django/test/utils.py
index 19a3190..180028a 100644
a
|
b
|
|
1 | 1 | from __future__ import with_statement |
2 | 2 | |
3 | | import sys |
4 | | import time |
5 | | import os |
6 | 3 | import warnings |
7 | 4 | from django.conf import settings, UserSettingsHolder |
8 | 5 | from django.core import mail |
9 | | from django.core.mail.backends import locmem |
10 | 6 | from django.test.signals import template_rendered, setting_changed |
11 | 7 | from django.template import Template, loader, TemplateDoesNotExist |
12 | 8 | from django.template.loaders import cached |
-
diff --git a/django/utils/cache.py b/django/utils/cache.py
index bd23940..81a8279 100644
a
|
b
|
from django.core.cache import get_cache
|
26 | 26 | from django.utils.encoding import smart_str, iri_to_uri |
27 | 27 | from django.utils.http import http_date |
28 | 28 | from django.utils.translation import get_language |
29 | | from django.http import HttpRequest |
30 | 29 | |
31 | 30 | cc_delim_re = re.compile(r'\s*,\s*') |
32 | 31 | |
-
diff --git a/django/utils/log.py b/django/utils/log.py
index 969a9d9..d25db69 100644
a
|
b
|
|
1 | 1 | import logging |
2 | | import sys |
3 | 2 | import traceback |
4 | 3 | |
5 | 4 | from django.conf import settings |
-
diff --git a/django/utils/text.py b/django/utils/text.py
index 00c999c..6c574b4 100644
a
|
b
|
|
1 | 1 | import re |
| 2 | from gzip import GzipFile |
| 3 | from htmlentitydefs import name2codepoint |
| 4 | |
| 5 | try: |
| 6 | from cStringIO import StringIO |
| 7 | except ImportError: |
| 8 | from StringIO import StringIO |
| 9 | |
2 | 10 | from django.utils.encoding import force_unicode |
3 | 11 | from django.utils.functional import allow_lazy |
4 | 12 | from django.utils.translation import ugettext_lazy, ugettext as _ |
5 | | from htmlentitydefs import name2codepoint |
| 13 | |
6 | 14 | |
7 | 15 | # Capitalizes the first letter of a string. |
8 | 16 | capfirst = lambda x: x and force_unicode(x)[0].upper() + force_unicode(x)[1:] |
… |
… |
phone2numeric = allow_lazy(phone2numeric)
|
180 | 188 | # From http://www.xhaus.com/alan/python/httpcomp.html#gzip |
181 | 189 | # Used with permission. |
182 | 190 | def compress_string(s): |
183 | | import cStringIO, gzip |
184 | | zbuf = cStringIO.StringIO() |
185 | | zfile = gzip.GzipFile(mode='wb', compresslevel=6, fileobj=zbuf) |
| 191 | zbuf = StringIO() |
| 192 | zfile = GzipFile(mode='wb', compresslevel=6, fileobj=zbuf) |
186 | 193 | zfile.write(s) |
187 | 194 | zfile.close() |
188 | 195 | return zbuf.getvalue() |
-
diff --git a/django/utils/timesince.py b/django/utils/timesince.py
index c584ce6..369a3e2 100644
a
|
b
|
|
1 | 1 | import datetime |
2 | | import time |
3 | 2 | |
4 | 3 | from django.utils.tzinfo import LocalTimezone |
5 | 4 | from django.utils.translation import ungettext, ugettext |
-
diff --git a/django/utils/translation/trans_null.py b/django/utils/translation/trans_null.py
index 5622c03..170cd5d 100644
a
|
b
|
|
2 | 2 | # that don't actually do anything. This is purely for performance, so that |
3 | 3 | # settings.USE_I18N = False can use this module rather than trans_real.py. |
4 | 4 | |
5 | | import warnings |
6 | 5 | from django.conf import settings |
7 | 6 | from django.utils.encoding import force_unicode |
8 | 7 | from django.utils.safestring import mark_safe, SafeData |
-
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py
index 9e8285b..345e46d 100644
a
|
b
|
import locale
|
4 | 4 | import os |
5 | 5 | import re |
6 | 6 | import sys |
7 | | import warnings |
8 | 7 | import gettext as gettext_module |
9 | | from cStringIO import StringIO |
10 | 8 | from threading import local |
11 | 9 | |
| 10 | try: |
| 11 | from cStringIO import StringIO |
| 12 | except ImportError: |
| 13 | from StringIO import StringIO |
| 14 | |
12 | 15 | from django.utils.importlib import import_module |
13 | 16 | from django.utils.safestring import mark_safe, SafeData |
14 | 17 | |
-
diff --git a/django/utils/unittest/__init__.py b/django/utils/unittest/__init__.py
index ac852a3..ac007b9 100644
a
|
b
|
except ImportError:
|
52 | 52 | |
53 | 53 | from django.utils.unittest.collector import collector |
54 | 54 | from django.utils.unittest.result import TestResult |
55 | | from django.utils.unittest.case import \ |
56 | | TestCase, FunctionTestCase, SkipTest, skip, skipIf,\ |
57 | | skipUnless, expectedFailure |
| 55 | from django.utils.unittest.case import (TestCase, FunctionTestCase, |
| 56 | SkipTest, skip, skipIf, skipUnless, expectedFailure) |
58 | 57 | |
59 | 58 | from django.utils.unittest.suite import BaseTestSuite, TestSuite |
60 | | from django.utils.unittest.loader import \ |
61 | | TestLoader, defaultTestLoader, makeSuite, getTestCaseNames,\ |
62 | | findTestCases |
| 59 | from django.utils.unittest.loader import (TestLoader, defaultTestLoader, |
| 60 | makeSuite, getTestCaseNames, findTestCases) |
63 | 61 | |
64 | 62 | from django.utils.unittest.main import TestProgram, main, main_ |
65 | 63 | from django.utils.unittest.runner import TextTestRunner, TextTestResult |
66 | 64 | |
67 | 65 | try: |
68 | | from django.utils.unittest.signals import\ |
69 | | installHandler, registerResult, removeResult, removeHandler |
| 66 | from django.utils.unittest.signals import (installHandler, |
| 67 | registerResult, removeResult, removeHandler) |
70 | 68 | except ImportError: |
71 | 69 | # Compatibility with platforms that don't have the signal module |
72 | 70 | pass |
-
diff --git a/django/utils/unittest/case.py b/django/utils/unittest/case.py
index 78507c1..d81d666 100644
a
|
b
|
from django.utils.unittest.util import\
|
12 | 12 | safe_repr, safe_str, strclass,\ |
13 | 13 | unorderable_list_difference |
14 | 14 | |
15 | | from django.utils.unittest.compatibility import wraps |
| 15 | from functools import wraps |
16 | 16 | |
17 | 17 | __unittest = True |
18 | 18 | |
-
diff --git a/django/utils/unittest/compatibility.py b/django/utils/unittest/compatibility.py
index a0dc499..b8d6397 100644
a
|
b
|
|
1 | 1 | import os |
2 | 2 | import sys |
3 | 3 | |
4 | | try: |
5 | | from functools import wraps |
6 | | except ImportError: |
7 | | # only needed for Python 2.4 |
8 | | def wraps(_): |
9 | | def _wraps(func): |
10 | | return func |
11 | | return _wraps |
| 4 | # Backwards compatibility: Django used to re-define `wraps` for Python 2.4. |
| 5 | from functools import wraps |
12 | 6 | |
13 | 7 | __unittest = True |
14 | 8 | |
-
diff --git a/django/utils/unittest/result.py b/django/utils/unittest/result.py
index 2d2a1ad..2b8fae2 100644
a
|
b
|
|
3 | 3 | import sys |
4 | 4 | import traceback |
5 | 5 | import unittest |
6 | | |
| 6 | from functools import wraps |
7 | 7 | from StringIO import StringIO |
8 | 8 | |
9 | 9 | from django.utils.unittest import util |
10 | | from django.utils.unittest.compatibility import wraps |
11 | 10 | |
12 | 11 | __unittest = True |
13 | 12 | |
-
diff --git a/django/utils/unittest/signals.py b/django/utils/unittest/signals.py
index f1731ea..fc31043 100644
a
|
b
|
|
1 | 1 | import signal |
2 | 2 | import weakref |
3 | 3 | |
4 | | from django.utils.unittest.compatibility import wraps |
| 4 | from functools import wraps |
5 | 5 | |
6 | 6 | __unittest = True |
7 | 7 | |
-
diff --git a/django/utils/version.py b/django/utils/version.py
index 557135f..cb8623b 100644
a
|
b
|
|
1 | 1 | import django |
2 | | import os.path |
3 | 2 | import re |
4 | 3 | |
5 | 4 | def get_svn_revision(path=None): |
-
diff --git a/django/views/debug.py b/django/views/debug.py
index 490d4bb..58d271b 100644
a
|
b
|
import os
|
3 | 3 | import re |
4 | 4 | import sys |
5 | 5 | import types |
6 | | from pprint import pformat |
7 | 6 | |
8 | 7 | from django.conf import settings |
9 | 8 | from django.http import (HttpResponse, HttpResponseServerError, |
-
diff --git a/django/views/decorators/http.py b/django/views/decorators/http.py
index 6fc882e..495a7b1 100644
a
|
b
|
Decorators for views based on HTTP headers.
|
3 | 3 | """ |
4 | 4 | |
5 | 5 | from calendar import timegm |
6 | | from datetime import timedelta |
7 | 6 | from functools import wraps |
8 | 7 | |
9 | 8 | from django.utils.decorators import decorator_from_middleware, available_attrs |
-
diff --git a/django/views/generic/base.py b/django/views/generic/base.py
index 6b52567..f2d4950 100644
a
|
b
|
|
1 | 1 | from functools import update_wrapper |
2 | 2 | from django import http |
3 | 3 | from django.core.exceptions import ImproperlyConfigured |
4 | | from django.template import RequestContext, loader |
5 | 4 | from django.template.response import TemplateResponse |
6 | 5 | from django.utils.log import getLogger |
7 | 6 | from django.utils.decorators import classonlymethod |
-
diff --git a/django/views/generic/detail.py b/django/views/generic/detail.py
index 7e9047f..16e2c48 100644
a
|
b
|
|
1 | | import re |
2 | | |
3 | 1 | from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist |
4 | 2 | from django.http import Http404 |
5 | 3 | from django.utils.encoding import smart_str |
-
diff --git a/django/views/generic/list.py b/django/views/generic/list.py
index 5135763..9797356 100644
a
|
b
|
|
1 | | import re |
2 | | |
3 | 1 | from django.core.paginator import Paginator, InvalidPage |
4 | 2 | from django.core.exceptions import ImproperlyConfigured |
5 | 3 | from django.http import Http404 |
-
diff --git a/tests/modeltests/basic/models.py b/tests/modeltests/basic/models.py
index 5f51fd8..26fddf0 100644
a
|
b
|
|
4 | 4 | |
5 | 5 | This is a basic model with only two non-primary-key fields. |
6 | 6 | """ |
7 | | from django.db import models, DEFAULT_DB_ALIAS, connection |
| 7 | from django.db import models |
8 | 8 | |
9 | 9 | class Article(models.Model): |
10 | 10 | headline = models.CharField(max_length=100, default='Default headline') |
-
diff --git a/tests/modeltests/basic/tests.py b/tests/modeltests/basic/tests.py
index 966798d..ff09d9b 100644
a
|
b
|
|
1 | 1 | from datetime import datetime |
2 | 2 | |
3 | 3 | from django.core.exceptions import ObjectDoesNotExist |
4 | | from django.db import models, DEFAULT_DB_ALIAS, connection |
5 | 4 | from django.db.models.fields import FieldDoesNotExist |
6 | 5 | from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature |
7 | 6 | |
-
diff --git a/tests/modeltests/custom_pk/models.py b/tests/modeltests/custom_pk/models.py
index ff2f2ba..c514fd7 100644
a
|
b
|
By default, Django adds an ``"id"`` field to each model. But you can override
|
6 | 6 | this behavior by explicitly adding ``primary_key=True`` to a field. |
7 | 7 | """ |
8 | 8 | |
9 | | from django.conf import settings |
10 | | from django.db import models, transaction, IntegrityError, DEFAULT_DB_ALIAS |
| 9 | from django.db import models |
11 | 10 | |
12 | 11 | from fields import MyAutoField |
13 | 12 | |
-
diff --git a/tests/modeltests/custom_pk/tests.py b/tests/modeltests/custom_pk/tests.py
index c410ad1..6b94b6d 100644
a
|
b
|
|
1 | 1 | # -*- coding: utf-8 -*- |
2 | | from django.conf import settings |
3 | | from django.db import DEFAULT_DB_ALIAS, transaction, IntegrityError |
| 2 | from django.db import transaction, IntegrityError |
4 | 3 | from django.test import TestCase, skipIfDBFeature |
5 | 4 | |
6 | 5 | from models import Employee, Business, Bar, Foo |
-
diff --git a/tests/modeltests/delete/models.py b/tests/modeltests/delete/models.py
index ee9e999..f8b78eb 100644
a
|
b
|
|
1 | | from django.db import models, IntegrityError |
| 1 | from django.db import models |
2 | 2 | |
3 | 3 | |
4 | 4 | class R(models.Model): |
-
diff --git a/tests/modeltests/field_subclassing/fields.py b/tests/modeltests/field_subclassing/fields.py
index 309648e..d6e4980 100644
a
|
b
|
|
1 | | from django.core.exceptions import FieldError |
2 | 1 | from django.db import models |
3 | 2 | from django.utils import simplejson as json |
4 | 3 | from django.utils.encoding import force_unicode |
-
diff --git a/tests/modeltests/field_subclassing/models.py b/tests/modeltests/field_subclassing/models.py
index b0d8336..c59c0d5 100644
a
|
b
|
Tests for field subclassing.
|
5 | 5 | from django.db import models |
6 | 6 | from django.utils.encoding import force_unicode |
7 | 7 | |
8 | | from fields import Small, SmallField, SmallerField, JSONField |
| 8 | from fields import SmallField, SmallerField, JSONField |
9 | 9 | |
10 | 10 | |
11 | 11 | class MyModel(models.Model): |
-
diff --git a/tests/modeltests/files/models.py b/tests/modeltests/files/models.py
index ca8965e..4134472 100644
a
|
b
|
import random
|
9 | 9 | import tempfile |
10 | 10 | |
11 | 11 | from django.db import models |
12 | | from django.core.files.base import ContentFile |
13 | 12 | from django.core.files.storage import FileSystemStorage |
14 | 13 | |
15 | 14 | |
-
diff --git a/tests/modeltests/files/tests.py b/tests/modeltests/files/tests.py
index 885f787..e8e7a76 100644
a
|
b
|
|
1 | 1 | from __future__ import with_statement |
2 | 2 | |
3 | 3 | import shutil |
4 | | import sys |
5 | 4 | import tempfile |
6 | 5 | |
7 | 6 | from django.core.cache import cache |
-
diff --git a/tests/modeltests/fixtures/models.py b/tests/modeltests/fixtures/models.py
index c8fd6a6..d2317d2 100644
a
|
b
|
in the application directory, or in one of the directories named in the
|
11 | 11 | from django.contrib.auth.models import Permission |
12 | 12 | from django.contrib.contenttypes import generic |
13 | 13 | from django.contrib.contenttypes.models import ContentType |
14 | | from django.db import models, DEFAULT_DB_ALIAS |
15 | | from django.conf import settings |
| 14 | from django.db import models |
16 | 15 | |
17 | 16 | |
18 | 17 | class Category(models.Model): |
-
diff --git a/tests/modeltests/fixtures/tests.py b/tests/modeltests/fixtures/tests.py
index 31f72f0..c335ffb 100644
a
|
b
|
|
1 | 1 | import StringIO |
2 | | import sys |
3 | 2 | |
4 | | from django.conf import settings |
5 | 3 | from django.contrib.sites.models import Site |
6 | 4 | from django.core import management |
7 | | from django.db import DEFAULT_DB_ALIAS |
8 | 5 | from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature |
9 | 6 | |
10 | | from models import Article, Blog, Book, Category, Person, Spy, Tag, Visa |
| 7 | from models import Article, Book, Spy, Tag, Visa |
11 | 8 | |
12 | 9 | |
13 | 10 | class TestCaseFixtureLoadingTests(TestCase): |
-
diff --git a/tests/modeltests/fixtures_model_package/models/__init__.py b/tests/modeltests/fixtures_model_package/models/__init__.py
index c0450b2..5cb0e4a 100644
a
|
b
|
|
1 | 1 | from django.db import models |
2 | | from django.conf import settings |
3 | 2 | |
4 | 3 | class Article(models.Model): |
5 | 4 | headline = models.CharField(max_length=100, default='Default headline') |
-
diff --git a/tests/modeltests/force_insert_update/models.py b/tests/modeltests/force_insert_update/models.py
index 9516be7..e617aa2 100644
a
|
b
|
|
2 | 2 | Tests for forcing insert and update queries (instead of Django's normal |
3 | 3 | automatic behaviour). |
4 | 4 | """ |
5 | | from django.db import models, transaction, IntegrityError |
| 5 | from django.db import models |
6 | 6 | |
7 | 7 | class Counter(models.Model): |
8 | 8 | name = models.CharField(max_length = 10) |
-
diff --git a/tests/modeltests/get_object_or_404/models.py b/tests/modeltests/get_object_or_404/models.py
index eb3cd82..f62dd0c 100644
a
|
b
|
performing a ``filter()`` lookup and raising a ``Http404`` exception if a
|
11 | 11 | """ |
12 | 12 | |
13 | 13 | from django.db import models |
14 | | from django.http import Http404 |
15 | | from django.shortcuts import get_object_or_404, get_list_or_404 |
16 | 14 | |
17 | 15 | class Author(models.Model): |
18 | 16 | name = models.CharField(max_length=50) |
-
diff --git a/tests/modeltests/get_or_create/models.py b/tests/modeltests/get_or_create/models.py
index db5719b..14f55f8 100644
a
|
b
|
given parameters. If an object isn't found, it creates one with the given
|
6 | 6 | parameters. |
7 | 7 | """ |
8 | 8 | |
9 | | from django.db import models, IntegrityError |
| 9 | from django.db import models |
10 | 10 | |
11 | 11 | class Person(models.Model): |
12 | 12 | first_name = models.CharField(max_length=100) |
-
diff --git a/tests/modeltests/lookup/models.py b/tests/modeltests/lookup/models.py
index d807531..82434bb 100644
a
|
b
|
|
4 | 4 | This demonstrates features of the database API. |
5 | 5 | """ |
6 | 6 | |
7 | | from django.db import models, DEFAULT_DB_ALIAS, connection |
8 | | from django.conf import settings |
| 7 | from django.db import models |
9 | 8 | |
10 | 9 | class Author(models.Model): |
11 | 10 | name = models.CharField(max_length=100) |
-
diff --git a/tests/modeltests/lookup/tests.py b/tests/modeltests/lookup/tests.py
index 3f40bf1..b05227c 100644
a
|
b
|
|
1 | 1 | from datetime import datetime |
2 | 2 | from operator import attrgetter |
3 | 3 | from django.core.exceptions import FieldError |
4 | | from django.db import connection |
5 | 4 | from django.test import TestCase, skipUnlessDBFeature |
6 | 5 | from models import Author, Article, Tag |
7 | 6 | |
-
diff --git a/tests/modeltests/m2m_through/tests.py b/tests/modeltests/m2m_through/tests.py
index 807e952..814e54f 100644
a
|
b
|
from operator import attrgetter
|
3 | 3 | |
4 | 4 | from django.test import TestCase |
5 | 5 | |
6 | | from models import Person, Group, Membership, CustomMembership, \ |
7 | | TestNoDefaultsOrNulls, PersonSelfRefM2M, Friendship |
| 6 | from models import (Person, Group, Membership, CustomMembership, |
| 7 | PersonSelfRefM2M, Friendship) |
8 | 8 | |
9 | 9 | |
10 | 10 | class M2mThroughTests(TestCase): |
-
diff --git a/tests/modeltests/model_forms/models.py b/tests/modeltests/model_forms/models.py
index 7204b28..5dcc039 100644
a
|
b
|
and the examples are probably a poor fit for the ``ModelForm`` syntax. In other
|
7 | 7 | words, most of these tests should be rewritten. |
8 | 8 | """ |
9 | 9 | |
10 | | import os |
11 | 10 | import tempfile |
12 | 11 | |
13 | 12 | from django.db import models |
-
diff --git a/tests/modeltests/model_formsets/tests.py b/tests/modeltests/model_formsets/tests.py
index 6303e6d..34f8d47 100644
a
|
b
|
from django.forms.models import (_get_foreign_key, inlineformset_factory,
|
10 | 10 | from django.test import TestCase, skipUnlessDBFeature |
11 | 11 | |
12 | 12 | from modeltests.model_formsets.models import ( |
13 | | Author, BetterAuthor, Book, BookWithCustomPK, Editor, |
| 13 | Author, BetterAuthor, Book, BookWithCustomPK, |
14 | 14 | BookWithOptionalAltEditor, AlternateBook, AuthorMeeting, CustomPrimaryKey, |
15 | 15 | Place, Owner, Location, OwnerProfile, Restaurant, Product, Price, |
16 | 16 | MexicanRestaurant, ClassyMexicanRestaurant, Repository, Revision, |
-
diff --git a/tests/modeltests/mutually_referential/tests.py b/tests/modeltests/mutually_referential/tests.py
index 101d67c..365c741 100644
a
|
b
|
|
1 | 1 | from django.test import TestCase |
2 | | from models import Parent, Child |
| 2 | from models import Parent |
3 | 3 | |
4 | 4 | class MutuallyReferentialTests(TestCase): |
5 | 5 | |
-
diff --git a/tests/modeltests/one_to_one/models.py b/tests/modeltests/one_to_one/models.py
index f263735..246c3fc 100644
a
|
b
|
To define a one-to-one relationship, use ``OneToOneField()``.
|
6 | 6 | In this example, a ``Place`` optionally can be a ``Restaurant``. |
7 | 7 | """ |
8 | 8 | |
9 | | from django.db import models, transaction, IntegrityError |
| 9 | from django.db import models |
10 | 10 | |
11 | 11 | class Place(models.Model): |
12 | 12 | name = models.CharField(max_length=50) |
-
diff --git a/tests/modeltests/pagination/tests.py b/tests/modeltests/pagination/tests.py
index eaee466..1129052 100644
a
|
b
|
|
1 | 1 | from datetime import datetime |
2 | | from operator import attrgetter |
3 | 2 | |
4 | 3 | from django.core.paginator import Paginator, InvalidPage, EmptyPage |
5 | 4 | from django.test import TestCase |
-
diff --git a/tests/modeltests/proxy_model_inheritance/tests.py b/tests/modeltests/proxy_model_inheritance/tests.py
index 7426f41..546c507 100644
a
|
b
|
apps and calls syncdb, then verifies that the table has been created.
|
9 | 9 | import os |
10 | 10 | import sys |
11 | 11 | |
12 | | from django.conf import settings, Settings |
| 12 | from django.conf import settings |
13 | 13 | from django.core.management import call_command |
14 | 14 | from django.db.models.loading import load_app |
15 | 15 | from django.test import TransactionTestCase |
-
diff --git a/tests/modeltests/proxy_models/models.py b/tests/modeltests/proxy_models/models.py
index 90d54d9..4fc9c6d 100644
a
|
b
|
than using a new table of their own. This allows them to act as simple proxies,
|
5 | 5 | providing a modified interface to the data from the base class. |
6 | 6 | """ |
7 | 7 | |
8 | | from django.contrib.contenttypes.models import ContentType |
9 | 8 | from django.db import models |
10 | 9 | |
11 | 10 | |
-
diff --git a/tests/modeltests/serializers/tests.py b/tests/modeltests/serializers/tests.py
index 013438e..bd528fc 100644
a
|
b
|
from django.db import transaction
|
9 | 9 | from django.test import TestCase, TransactionTestCase, Approximate |
10 | 10 | from django.utils import simplejson, unittest |
11 | 11 | |
12 | | from models import Category, Author, Article, AuthorProfile, Actor, \ |
13 | | Movie, Score, Player, Team |
| 12 | from models import Category, Author, Article, AuthorProfile, Actor, Movie, Score, Player, Team |
14 | 13 | |
15 | 14 | class SerializerRegistrationTests(unittest.TestCase): |
16 | 15 | def setUp(self): |
-
diff --git a/tests/modeltests/transactions/models.py b/tests/modeltests/transactions/models.py
index d957fe1..b2ae396 100644
a
|
b
|
commit-on-success behavior. Alternatively, you can manage the transaction
|
7 | 7 | manually. |
8 | 8 | """ |
9 | 9 | |
10 | | from django.db import models, DEFAULT_DB_ALIAS |
| 10 | from django.db import models |
11 | 11 | |
12 | 12 | class Reporter(models.Model): |
13 | 13 | first_name = models.CharField(max_length=30) |
-
diff --git a/tests/modeltests/transactions/tests.py b/tests/modeltests/transactions/tests.py
index db58b80..5cebe67 100644
a
|
b
|
|
1 | 1 | from __future__ import with_statement |
2 | 2 | |
3 | | import sys |
4 | | |
5 | | from django.db import connection, transaction, IntegrityError, DEFAULT_DB_ALIAS |
6 | | from django.conf import settings |
| 3 | from django.db import connection, transaction, IntegrityError |
7 | 4 | from django.test import TransactionTestCase, skipUnlessDBFeature |
8 | 5 | |
9 | 6 | from models import Reporter |
-
diff --git a/tests/modeltests/unmanaged_models/tests.py b/tests/modeltests/unmanaged_models/tests.py
index dee3799..b9817ef 100644
a
|
b
|
|
1 | 1 | from django.test import TestCase |
2 | 2 | from django.db import connection |
3 | | from models import Unmanaged1, Unmanaged2, Managed1 |
4 | | from models import A01, A02, B01, B02, C01, C02 |
| 3 | from models import A01, A02, B01, B02, C01, C02, Unmanaged2, Managed1 |
5 | 4 | |
6 | 5 | class SimpleTests(TestCase): |
7 | 6 | |
-
diff --git a/tests/modeltests/validation/models.py b/tests/modeltests/validation/models.py
index f92fc1f..52e1f97 100644
a
|
b
|
|
1 | 1 | from datetime import datetime |
2 | 2 | from django.core.exceptions import ValidationError |
3 | 3 | from django.db import models |
4 | | from django.test import TestCase |
5 | 4 | |
6 | 5 | |
7 | 6 | def validate_answer_to_universe(value): |
-
diff --git a/tests/modeltests/validation/validators.py b/tests/modeltests/validation/validators.py
index 6a7d833..30ce661 100644
a
|
b
|
|
1 | | from django.utils.unittest import TestCase |
2 | | |
3 | 1 | from modeltests.validation import ValidationTestCase |
4 | 2 | from models import * |
5 | 3 | |
-
diff --git a/tests/regressiontests/admin_filters/tests.py b/tests/regressiontests/admin_filters/tests.py
index 5095abb..b4c4f34 100644
a
|
b
|
|
1 | | from __future__ import with_statement |
2 | | |
3 | 1 | import datetime |
4 | 2 | |
5 | 3 | from django.core.exceptions import ImproperlyConfigured |
-
diff --git a/tests/regressiontests/admin_validation/tests.py b/tests/regressiontests/admin_validation/tests.py
index 2cf3c60..ef391ff 100644
a
|
b
|
|
1 | 1 | from django.contrib import admin |
2 | 2 | from django import forms |
3 | | from django.contrib.admin.validation import validate, validate_inline, \ |
4 | | ImproperlyConfigured |
| 3 | from django.contrib.admin.validation import validate, validate_inline, ImproperlyConfigured |
5 | 4 | from django.test import TestCase |
6 | 5 | |
7 | 6 | from models import Song, Book, Album, TwoAlbumFKAndAnE, State, City |
-
diff --git a/tests/regressiontests/bash_completion/management/commands/test_command.py b/tests/regressiontests/bash_completion/management/commands/test_command.py
index 5cb8820..0f57506 100644
a
|
b
|
|
1 | | import sys, os |
2 | | from optparse import OptionParser, make_option |
| 1 | from optparse import make_option |
3 | 2 | |
4 | 3 | from django.core.management.base import BaseCommand |
5 | 4 | |
-
diff --git a/tests/regressiontests/comment_tests/tests/comment_utils_moderators_tests.py b/tests/regressiontests/comment_tests/tests/comment_utils_moderators_tests.py
index 4177163..9d6a9e7 100644
a
|
b
|
|
1 | | from regressiontests.comment_tests.tests import CommentTestCase, CT, Site |
2 | | from django.contrib.comments.forms import CommentForm |
| 1 | from regressiontests.comment_tests.tests import CommentTestCase |
3 | 2 | from django.contrib.comments.models import Comment |
4 | 3 | from django.contrib.comments.moderation import moderator, CommentModerator, AlreadyModerated |
5 | 4 | from regressiontests.comment_tests.models import Entry |
-
diff --git a/tests/regressiontests/comment_tests/tests/feed_tests.py b/tests/regressiontests/comment_tests/tests/feed_tests.py
index 2dccbcd..4497f95 100644
a
|
b
|
|
1 | | import warnings |
2 | | |
3 | | from django.test.utils import get_warnings_state, restore_warnings_state |
4 | | |
5 | 1 | from regressiontests.comment_tests.tests import CommentTestCase |
6 | 2 | |
7 | 3 | |
-
diff --git a/tests/regressiontests/comment_tests/tests/templatetag_tests.py b/tests/regressiontests/comment_tests/tests/templatetag_tests.py
index 0ead6c2..0ee34ac 100644
a
|
b
|
|
1 | 1 | from django.contrib.comments.forms import CommentForm |
2 | | from django.contrib.comments.models import Comment |
3 | 2 | from django.contrib.contenttypes.models import ContentType |
4 | 3 | from django.template import Template, Context |
5 | 4 | from regressiontests.comment_tests.models import Article, Author |
-
diff --git a/tests/regressiontests/csrf_tests/tests.py b/tests/regressiontests/csrf_tests/tests.py
index b3238a7..c5f9f36 100644
a
|
b
|
|
1 | 1 | # -*- coding: utf-8 -*- |
2 | 2 | from __future__ import with_statement |
3 | | import warnings |
4 | 3 | |
5 | 4 | from django.test import TestCase |
6 | 5 | from django.http import HttpRequest, HttpResponse |
-
diff --git a/tests/regressiontests/datatypes/tests.py b/tests/regressiontests/datatypes/tests.py
index e161be9..2d40fec 100644
a
|
b
|
|
1 | 1 | import datetime |
2 | 2 | |
3 | | from django.conf import settings |
4 | | from django.db import DEFAULT_DB_ALIAS |
5 | 3 | from django.test import TestCase, skipIfDBFeature |
6 | 4 | from django.utils import tzinfo |
7 | 5 | |
-
diff --git a/tests/regressiontests/defer_regress/models.py b/tests/regressiontests/defer_regress/models.py
index 4e4ab0a..1d1a224 100644
a
|
b
|
|
2 | 2 | Regression tests for defer() / only() behavior. |
3 | 3 | """ |
4 | 4 | |
5 | | from django.conf import settings |
6 | | from django.contrib.contenttypes.models import ContentType |
7 | | from django.db import connection, models |
| 5 | from django.db import models |
8 | 6 | |
9 | 7 | class Item(models.Model): |
10 | 8 | name = models.CharField(max_length=15) |
-
diff --git a/tests/regressiontests/defer_regress/tests.py b/tests/regressiontests/defer_regress/tests.py
index fbcf85e..2135522 100644
a
|
b
|
|
1 | 1 | from operator import attrgetter |
2 | 2 | |
3 | | from django.conf import settings |
4 | 3 | from django.contrib.contenttypes.models import ContentType |
5 | 4 | from django.contrib.sessions.backends.db import SessionStore |
6 | | from django.db import connection |
7 | 5 | from django.db.models.loading import cache |
8 | 6 | from django.test import TestCase |
9 | 7 | |
-
diff --git a/tests/regressiontests/delete_regress/tests.py b/tests/regressiontests/delete_regress/tests.py
index ec26676..22b4833 100644
a
|
b
|
|
1 | 1 | import datetime |
2 | 2 | |
3 | 3 | from django.conf import settings |
4 | | from django.db import backend, connection, transaction, DEFAULT_DB_ALIAS |
| 4 | from django.db import backend, transaction, DEFAULT_DB_ALIAS |
5 | 5 | from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature |
6 | 6 | |
7 | 7 | from models import (Book, Award, AwardNote, Person, Child, Toy, PlayedWith, |
8 | | PlayedWithNote, Contact, Email, Researcher, Food, Eaten, |
| 8 | PlayedWithNote, Email, Researcher, Food, Eaten, |
9 | 9 | Policy, Version, Location, Item) |
10 | 10 | |
11 | 11 | |
-
diff --git a/tests/regressiontests/expressions_regress/tests.py b/tests/regressiontests/expressions_regress/tests.py
index a900c6c..497a843 100644
a
|
b
|
Spanning tests for all the operations that F() expressions can perform.
|
3 | 3 | """ |
4 | 4 | import datetime |
5 | 5 | |
6 | | from django.conf import settings |
7 | | from django.db import models, connection |
| 6 | from django.db import connection |
8 | 7 | from django.db.models import F |
9 | 8 | from django.test import TestCase, Approximate, skipUnlessDBFeature |
10 | 9 | |
-
diff --git a/tests/regressiontests/extra_regress/tests.py b/tests/regressiontests/extra_regress/tests.py
index ef7cbb8..5f779be 100644
a
|
b
|
from django.test import TestCase
|
3 | 3 | from django.utils.datastructures import SortedDict |
4 | 4 | |
5 | 5 | from django.contrib.auth.models import User |
6 | | from regressiontests.extra_regress.models import TestObject, Order, \ |
7 | | RevisionableModel |
| 6 | from regressiontests.extra_regress.models import TestObject, Order, RevisionableModel |
8 | 7 | |
9 | 8 | import datetime |
10 | 9 | |
-
diff --git a/tests/regressiontests/file_storage/tests.py b/tests/regressiontests/file_storage/tests.py
index 917d2f3..40710eb 100644
a
|
b
|
except ImportError:
|
18 | 18 | |
19 | 19 | from django.conf import settings |
20 | 20 | from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured |
21 | | from django.core.files.base import ContentFile, File |
| 21 | from django.core.files.base import ContentFile |
22 | 22 | from django.core.files.images import get_image_dimensions |
23 | 23 | from django.core.files.storage import FileSystemStorage, get_storage_class |
24 | 24 | from django.core.files.uploadedfile import UploadedFile |
-
diff --git a/tests/regressiontests/fixtures_regress/models.py b/tests/regressiontests/fixtures_regress/models.py
index 2dfb550..b353f80 100644
a
|
b
|
|
1 | | from django.db import models, DEFAULT_DB_ALIAS, connection |
| 1 | from django.db import models |
2 | 2 | from django.contrib.auth.models import User |
3 | | from django.conf import settings |
4 | 3 | |
5 | 4 | |
6 | 5 | class Animal(models.Model): |
-
diff --git a/tests/regressiontests/fixtures_regress/tests.py b/tests/regressiontests/fixtures_regress/tests.py
index 3dc4ede..a565ec9 100644
a
|
b
|
|
2 | 2 | # Unittests for fixtures. |
3 | 3 | import os |
4 | 4 | import re |
5 | | import sys |
6 | 5 | try: |
7 | 6 | from cStringIO import StringIO |
8 | 7 | except ImportError: |
… |
… |
from django.core.management.commands.dumpdata import sort_dependencies
|
13 | 12 | from django.core.management.base import CommandError |
14 | 13 | from django.db.models import signals |
15 | 14 | from django.db import transaction |
16 | | from django.test import TestCase, TransactionTestCase, skipIfDBFeature, \ |
17 | | skipUnlessDBFeature |
| 15 | from django.test import (TestCase, TransactionTestCase, skipIfDBFeature, |
| 16 | skipUnlessDBFeature) |
18 | 17 | |
19 | 18 | from models import Animal, Stuff |
20 | 19 | from models import Absolute, Parent, Child |
-
diff --git a/tests/regressiontests/forms/localflavor/cl.py b/tests/regressiontests/forms/localflavor/cl.py
index b2b4562..59e4824 100644
a
|
b
|
|
1 | 1 | from django.contrib.localflavor.cl.forms import CLRutField, CLRegionSelect |
2 | | from django.core.exceptions import ValidationError |
3 | 2 | |
4 | 3 | from utils import LocalFlavorTestCase |
5 | 4 | |
-
diff --git a/tests/regressiontests/forms/tests/fields.py b/tests/regressiontests/forms/tests/fields.py
index ad8d1d9..152a13e 100644
a
|
b
|
Other than that, the Field subclasses have class-specific options for
|
25 | 25 | __init__(). For example, CharField has a max_length option. |
26 | 26 | """ |
27 | 27 | import datetime |
28 | | import time |
29 | 28 | import re |
30 | 29 | import os |
31 | 30 | import urllib2 |
… |
… |
from decimal import Decimal
|
33 | 32 | |
34 | 33 | from django.core.files.uploadedfile import SimpleUploadedFile |
35 | 34 | from django.forms import * |
36 | | from django.forms.widgets import RadioFieldRenderer |
37 | 35 | from django.utils.unittest import TestCase |
38 | 36 | |
39 | 37 | |
-
diff --git a/tests/regressiontests/forms/tests/forms.py b/tests/regressiontests/forms/tests/forms.py
index 91a7472..ce4004e 100644
a
|
b
|
|
1 | 1 | # -*- coding: utf-8 -*- |
2 | 2 | import datetime |
3 | | from decimal import Decimal |
4 | | import re |
5 | | import time |
6 | 3 | from django.core.files.uploadedfile import SimpleUploadedFile |
7 | 4 | from django.forms import * |
8 | 5 | from django.http import QueryDict |
-
diff --git a/tests/regressiontests/forms/tests/models.py b/tests/regressiontests/forms/tests/models.py
index 3f548df..5e1bd82 100644
a
|
b
|
import datetime
|
3 | 3 | from django.core.files.uploadedfile import SimpleUploadedFile |
4 | 4 | from django.forms import Form, ModelForm, FileField, ModelChoiceField |
5 | 5 | from django.test import TestCase |
6 | | from regressiontests.forms.models import ChoiceModel, ChoiceOptionModel, ChoiceFieldModel, FileModel, Group, BoundaryModel, Defaults |
| 6 | from regressiontests.forms.models import (ChoiceOptionModel, ChoiceFieldModel, |
| 7 | FileModel, Group, BoundaryModel, Defaults) |
7 | 8 | |
8 | 9 | |
9 | 10 | class ChoiceFieldForm(ModelForm): |
-
diff --git a/tests/regressiontests/forms/tests/widgets.py b/tests/regressiontests/forms/tests/widgets.py
index 0a8a879..b4ceb2f 100644
a
|
b
|
|
2 | 2 | |
3 | 3 | import copy |
4 | 4 | import datetime |
5 | | import re |
6 | | import time |
7 | | from decimal import Decimal |
8 | 5 | from django.conf import settings |
9 | 6 | from django.core.files.uploadedfile import SimpleUploadedFile |
10 | 7 | from django.forms import * |
-
diff --git a/tests/regressiontests/generic_inline_admin/tests.py b/tests/regressiontests/generic_inline_admin/tests.py
index c40b6dd..b037ebe 100644
a
|
b
|
from django.contrib.contenttypes.generic import generic_inlineformset_factory
|
5 | 5 | from django.test import TestCase |
6 | 6 | |
7 | 7 | # local test models |
8 | | from models import Episode, EpisodeExtra, EpisodeMaxNum, EpisodeExclude, \ |
9 | | Media, EpisodePermanent, MediaPermanentInline, Category |
| 8 | from models import (Episode, EpisodeExtra, EpisodeMaxNum, EpisodeExclude, |
| 9 | Media, EpisodePermanent, MediaPermanentInline, Category) |
10 | 10 | |
11 | 11 | |
12 | 12 | class GenericAdminViewTest(TestCase): |
-
diff --git a/tests/regressiontests/generic_relations_regress/tests.py b/tests/regressiontests/generic_relations_regress/tests.py
index 45e8674..52731a9 100644
a
|
b
|
|
1 | 1 | from django.test import TestCase |
2 | | from django.contrib.contenttypes.models import ContentType |
3 | 2 | from django.db.models import Q |
4 | 3 | from models import * |
5 | 4 | |
-
diff --git a/tests/regressiontests/generic_views/base.py b/tests/regressiontests/generic_views/base.py
index fc5cf62..40490a4 100644
a
|
b
|
import unittest
|
4 | 4 | from django.core.exceptions import ImproperlyConfigured |
5 | 5 | from django.http import HttpResponse |
6 | 6 | from django.test import TestCase, RequestFactory |
7 | | from django.utils import simplejson |
8 | 7 | from django.views.generic import View, TemplateView, RedirectView |
9 | 8 | |
10 | 9 | |
-
diff --git a/tests/regressiontests/generic_views/dates.py b/tests/regressiontests/generic_views/dates.py
index 5b784f6..b9608d6 100644
a
|
b
|
|
1 | 1 | import datetime |
2 | | import random |
3 | 2 | |
4 | 3 | from django.core.exceptions import ImproperlyConfigured |
5 | 4 | from django.test import TestCase |
-
diff --git a/tests/regressiontests/generic_views/list.py b/tests/regressiontests/generic_views/list.py
index c41680c..f5bf910 100644
a
|
b
|
from django.core.exceptions import ImproperlyConfigured
|
2 | 2 | from django.test import TestCase |
3 | 3 | |
4 | 4 | from regressiontests.generic_views.models import Author, Artist |
5 | | from regressiontests.generic_views.views import CustomPaginator |
6 | 5 | |
7 | 6 | class ListViewTests(TestCase): |
8 | 7 | fixtures = ['generic-views-test-data.json'] |
-
diff --git a/tests/regressiontests/i18n/forms.py b/tests/regressiontests/i18n/forms.py
index 156441c..600f252 100644
a
|
b
|
|
1 | | from django import template, forms |
| 1 | from django import forms |
2 | 2 | from django.forms.extras import SelectDateWidget |
| 3 | |
3 | 4 | from models import Company |
4 | 5 | |
5 | 6 | class I18nForm(forms.Form): |
-
diff --git a/tests/regressiontests/i18n/tests.py b/tests/regressiontests/i18n/tests.py
index e3add3e..194825f 100644
a
|
b
|
from __future__ import with_statement
|
3 | 3 | import datetime |
4 | 4 | import decimal |
5 | 5 | import os |
6 | | import sys |
7 | 6 | import pickle |
8 | 7 | from threading import local |
9 | 8 | |
-
diff --git a/tests/regressiontests/introspection/tests.py b/tests/regressiontests/introspection/tests.py
index e309a98..4f5fb09 100644
a
|
b
|
|
1 | 1 | from functools import update_wrapper |
2 | | from django.conf import settings |
3 | | from django.db import connection, DEFAULT_DB_ALIAS |
| 2 | from django.db import connection |
4 | 3 | from django.test import TestCase, skipUnlessDBFeature |
5 | 4 | |
6 | 5 | from models import Reporter, Article |
-
diff --git a/tests/regressiontests/localflavor/tests.py b/tests/regressiontests/localflavor/tests.py
index 6a02d99..6a15d46 100644
a
|
b
|
|
1 | | from django.test import TestCase |
2 | | from django.utils import unittest |
3 | | |
4 | | # just import your tests here |
5 | 1 | from au.tests import * |
6 | 2 | from mk.tests import * |
7 | 3 | from us.tests import * |
-
diff --git a/tests/regressiontests/m2m_through_regress/models.py b/tests/regressiontests/m2m_through_regress/models.py
index 121ef22..ff71348 100644
a
|
b
|
|
1 | | from datetime import datetime |
2 | | |
3 | 1 | from django.contrib.auth.models import User |
4 | | from django.core import management |
5 | 2 | from django.db import models |
6 | 3 | |
7 | 4 | |
-
diff --git a/tests/regressiontests/max_lengths/tests.py b/tests/regressiontests/max_lengths/tests.py
index 59d98d6..f743378 100644
a
|
b
|
|
1 | | from django.db import DatabaseError |
2 | 1 | from django.utils import unittest |
3 | 2 | from regressiontests.max_lengths.models import PersonWithDefaultMaxLengths, PersonWithCustomMaxLengths |
4 | 3 | |
-
diff --git a/tests/regressiontests/middleware_exceptions/models.py b/tests/regressiontests/middleware_exceptions/models.py
index 137941f..e69de29 100644
a
|
b
|
|
1 | | from django.db import models |
-
diff --git a/tests/regressiontests/model_fields/imagefield.py b/tests/regressiontests/model_fields/imagefield.py
index dd79e7a..c952aa9 100644
a
|
b
|
import os
|
2 | 2 | import shutil |
3 | 3 | |
4 | 4 | from django.core.files import File |
5 | | from django.core.files.base import ContentFile |
6 | 5 | from django.core.files.images import ImageFile |
7 | 6 | from django.test import TestCase |
8 | 7 | |
9 | | from models import Image, Person, PersonWithHeight, PersonWithHeightAndWidth, \ |
10 | | PersonDimensionsFirst, PersonTwoImages, TestImageFieldFile |
| 8 | from models import (Image, Person, PersonWithHeight, PersonWithHeightAndWidth, |
| 9 | PersonDimensionsFirst, PersonTwoImages, TestImageFieldFile) |
11 | 10 | |
12 | 11 | |
13 | 12 | # If PIL available, do these tests. |
-
diff --git a/tests/regressiontests/model_fields/tests.py b/tests/regressiontests/model_fields/tests.py
index b42c0af..3e9d614 100644
a
|
b
|
from models import Foo, Bar, Whiz, BigD, BigS, Image, BigInt, Post, NullBooleanM
|
12 | 12 | |
13 | 13 | # If PIL available, do these tests. |
14 | 14 | if Image: |
15 | | from imagefield import \ |
16 | | ImageFieldTests, \ |
17 | | ImageFieldTwoDimensionsTests, \ |
18 | | ImageFieldNoDimensionsTests, \ |
19 | | ImageFieldOneDimensionTests, \ |
20 | | ImageFieldDimensionsFirstTests, \ |
21 | | ImageFieldUsingFileTests, \ |
22 | | TwoImageFieldTests |
| 15 | from imagefield import ( |
| 16 | ImageFieldTests, |
| 17 | ImageFieldTwoDimensionsTests, |
| 18 | ImageFieldNoDimensionsTests, |
| 19 | ImageFieldOneDimensionTests, |
| 20 | ImageFieldDimensionsFirstTests, |
| 21 | ImageFieldUsingFileTests, |
| 22 | TwoImageFieldTests) |
23 | 23 | |
24 | 24 | |
25 | 25 | class BasicFieldTests(test.TestCase): |
-
diff --git a/tests/regressiontests/model_forms_regress/tests.py b/tests/regressiontests/model_forms_regress/tests.py
index 9817858..9860c2e 100644
a
|
b
|
from django.forms.models import (modelform_factory, ModelChoiceField,
|
8 | 8 | from django.utils import unittest |
9 | 9 | from django.test import TestCase |
10 | 10 | |
11 | | from models import Person, RealPerson, Triple, FilePathModel, Article, \ |
12 | | Publication, CustomFF, Author, Author1, Homepage, Document, Edition |
| 11 | from models import (Person, RealPerson, Triple, FilePathModel, Article, |
| 12 | Publication, CustomFF, Author, Author1, Homepage, Document, Edition) |
13 | 13 | |
14 | 14 | |
15 | 15 | class ModelMultipleChoiceFieldTests(TestCase): |
-
diff --git a/tests/regressiontests/modeladmin/models.py b/tests/regressiontests/modeladmin/models.py
index 26eaaae..ae180a4 100644
a
|
b
|
|
1 | 1 | # coding: utf-8 |
2 | | from datetime import date |
3 | | |
4 | 2 | from django.db import models |
5 | 3 | from django.contrib.auth.models import User |
6 | 4 | |
-
diff --git a/tests/regressiontests/multiple_database/models.py b/tests/regressiontests/multiple_database/models.py
index ce71828..8146c57 100644
a
|
b
|
|
1 | | from django.conf import settings |
2 | 1 | from django.contrib.auth.models import User |
3 | 2 | from django.contrib.contenttypes.models import ContentType |
4 | 3 | from django.contrib.contenttypes import generic |
-
diff --git a/tests/regressiontests/multiple_database/tests.py b/tests/regressiontests/multiple_database/tests.py
index 551a677..74b928a 100644
a
|
b
|
|
1 | 1 | import datetime |
2 | 2 | import pickle |
3 | | import sys |
4 | 3 | from StringIO import StringIO |
5 | 4 | |
6 | 5 | from django.conf import settings |
… |
… |
from django.contrib.auth.models import User
|
8 | 7 | from django.core import management |
9 | 8 | from django.db import connections, router, DEFAULT_DB_ALIAS |
10 | 9 | from django.db.models import signals |
11 | | from django.db.utils import ConnectionRouter |
12 | 10 | from django.test import TestCase |
13 | 11 | |
14 | 12 | from models import Book, Person, Pet, Review, UserProfile |
-
diff --git a/tests/regressiontests/select_related_onetoone/tests.py b/tests/regressiontests/select_related_onetoone/tests.py
index ab35fec..3e7023a 100644
a
|
b
|
|
1 | | from django import db |
2 | | from django.conf import settings |
3 | 1 | from django.test import TestCase |
4 | 2 | |
5 | 3 | from models import (User, UserProfile, UserStat, UserStatResult, StatDetails, |
-
diff --git a/tests/regressiontests/serializers_regress/tests.py b/tests/regressiontests/serializers_regress/tests.py
index 90a438c..cd2ce3c 100644
a
|
b
|
try:
|
15 | 15 | except ImportError: |
16 | 16 | from StringIO import StringIO |
17 | 17 | |
18 | | from django.conf import settings |
19 | | from django.core import serializers, management |
| 18 | from django.core import serializers |
20 | 19 | from django.core.serializers import SerializerDoesNotExist |
21 | | from django.db import transaction, DEFAULT_DB_ALIAS, connection |
| 20 | from django.db import connection |
22 | 21 | from django.test import TestCase |
23 | 22 | from django.utils.functional import curry |
24 | 23 | |
-
diff --git a/tests/regressiontests/signals_regress/tests.py b/tests/regressiontests/signals_regress/tests.py
index 630b16f..332f5d9 100644
a
|
b
|
|
1 | | import sys |
2 | | from StringIO import StringIO |
3 | 1 | from django.test import TestCase |
4 | 2 | |
5 | 3 | from django.db import models |
-
diff --git a/tests/regressiontests/syndication/tests.py b/tests/regressiontests/syndication/tests.py
index 2f90dc0..6643298 100644
a
|
b
|
|
1 | | import datetime |
2 | | import warnings |
3 | 1 | from xml.dom import minidom |
4 | 2 | |
5 | 3 | from django.contrib.syndication import views |
-
diff --git a/tests/regressiontests/templates/custom.py b/tests/regressiontests/templates/custom.py
index 74c39ab..d781874 100644
a
|
b
|
|
1 | | from __future__ import with_statement |
2 | | |
3 | 1 | from django import template |
4 | 2 | from django.utils.unittest import TestCase |
5 | 3 | from templatetags import custom |
-
diff --git a/tests/regressiontests/templates/loaders.py b/tests/regressiontests/templates/loaders.py
index 1773592..c2ae0bd 100644
a
|
b
|
import pkg_resources
|
14 | 14 | import imp |
15 | 15 | import StringIO |
16 | 16 | import os.path |
17 | | import warnings |
18 | 17 | |
19 | 18 | from django.template import TemplateDoesNotExist, Context |
20 | 19 | from django.template.loaders.eggs import Loader as EggLoader |
21 | 20 | from django.template import loader |
22 | | from django.test.utils import get_warnings_state, restore_warnings_state |
23 | 21 | from django.utils import unittest |
24 | 22 | |
25 | 23 | |
-
diff --git a/tests/regressiontests/templates/response.py b/tests/regressiontests/templates/response.py
index 6fc2ded..a1257fe 100644
a
|
b
|
from django.utils import unittest
|
6 | 6 | from django.test import RequestFactory, TestCase |
7 | 7 | from django.conf import settings |
8 | 8 | import django.template.context |
9 | | from django.template import Template, Context, RequestContext |
| 9 | from django.template import Template, Context |
10 | 10 | from django.template.response import (TemplateResponse, SimpleTemplateResponse, |
11 | 11 | ContentNotRenderedError) |
12 | 12 | |
-
diff --git a/tests/regressiontests/templates/smartif.py b/tests/regressiontests/templates/smartif.py
index 2ce2df3..3a705ca 100644
a
|
b
|
|
1 | | from django.template.smartif import IfParser, Literal |
| 1 | from django.template.smartif import IfParser |
2 | 2 | from django.utils import unittest |
3 | 3 | |
4 | 4 | class SmartIfTests(unittest.TestCase): |
-
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
index 36a1ca3..4ed7c53 100644
a
|
b
|
import traceback
|
14 | 14 | import warnings |
15 | 15 | |
16 | 16 | from django import template |
17 | | from django.template import base as template_base |
| 17 | from django.template import base as template_base, RequestContext |
18 | 18 | from django.core import urlresolvers |
19 | 19 | from django.template import loader |
20 | 20 | from django.template.loaders import app_directories, filesystem, cached |
21 | | from django.test.utils import get_warnings_state, restore_warnings_state,\ |
22 | | setup_test_template_loader, restore_template_loaders |
| 21 | from django.test.utils import (get_warnings_state, restore_warnings_state, |
| 22 | setup_test_template_loader, restore_template_loaders) |
23 | 23 | from django.utils import unittest |
24 | 24 | from django.utils.formats import date_format |
25 | 25 | from django.utils.translation import activate, deactivate, ugettext as _ |
-
diff --git a/tests/regressiontests/test_utils/tests.py b/tests/regressiontests/test_utils/tests.py
index 673295b..a35b0bc 100644
a
|
b
|
|
1 | 1 | from __future__ import with_statement |
2 | 2 | |
3 | | import sys |
4 | | |
5 | | from django.test import TestCase, skipUnlessDBFeature, skipIfDBFeature |
| 3 | from django.test import TestCase, skipUnlessDBFeature |
6 | 4 | from django.utils.unittest import skip |
7 | 5 | |
8 | 6 | from models import Person |
-
diff --git a/tests/regressiontests/urlpatterns_reverse/middleware.py b/tests/regressiontests/urlpatterns_reverse/middleware.py
index cd3c045..7bc42f8 100644
a
|
b
|
|
1 | | from django.core.urlresolvers import set_urlconf |
2 | | |
3 | 1 | import urlconf_inner |
4 | 2 | |
5 | 3 | class ChangeURLconfMiddleware(object): |
-
diff --git a/tests/regressiontests/urlpatterns_reverse/tests.py b/tests/regressiontests/urlpatterns_reverse/tests.py
index 31a928c..3db14d3 100644
a
|
b
|
Unit tests for reverse URL lookups.
|
3 | 3 | """ |
4 | 4 | from django.conf import settings |
5 | 5 | from django.core.exceptions import ImproperlyConfigured |
6 | | from django.core.urlresolvers import reverse, resolve, NoReverseMatch,\ |
7 | | Resolver404, ResolverMatch,\ |
8 | | RegexURLResolver, RegexURLPattern |
| 6 | from django.core.urlresolvers import (reverse, resolve, NoReverseMatch, |
| 7 | Resolver404, ResolverMatch, RegexURLResolver, RegexURLPattern) |
9 | 8 | from django.http import HttpResponseRedirect, HttpResponsePermanentRedirect |
10 | 9 | from django.shortcuts import redirect |
11 | 10 | from django.test import TestCase |
-
diff --git a/tests/regressiontests/utils/jslex.py b/tests/regressiontests/utils/jslex.py
index 08e8386..7cd93ca 100644
a
|
b
|
|
2 | 2 | # encoding: utf-8 |
3 | 3 | # originally from https://bitbucket.org/ned/jslex |
4 | 4 | |
5 | | import difflib |
6 | 5 | from django.test import TestCase |
7 | 6 | from django.utils.jslex import JsLexer, prepare_js_for_gettext |
8 | 7 | |
-
diff --git a/tests/regressiontests/views/tests/debug.py b/tests/regressiontests/views/tests/debug.py
index 1dbaff4..ac12fbd 100644
a
|
b
|
from django.test import TestCase, RequestFactory
|
9 | 9 | from django.core.urlresolvers import reverse |
10 | 10 | from django.template import TemplateSyntaxError |
11 | 11 | from django.views.debug import ExceptionReporter |
12 | | from django.core.exceptions import ImproperlyConfigured |
13 | 12 | from django.core import mail |
14 | 13 | |
15 | 14 | from regressiontests.views import BrokenException, except_args |
-
diff --git a/tests/regressiontests/views/tests/defaults.py b/tests/regressiontests/views/tests/defaults.py
index c7c295a..6378cf9 100644
a
|
b
|
|
1 | | from os import path |
2 | | |
3 | | from django.conf import settings |
4 | 1 | from django.test import TestCase |
5 | 2 | from django.contrib.contenttypes.models import ContentType |
6 | 3 | |