code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
""" The GeometryProxy object, allows for lazy-geometries. The proxy uses Python descriptors for instantiating and setting Geometry objects corresponding to geographic model fields. Thanks to Robert Coup for providing this functionality (see #4322). """ from django.contrib.gis import memoryview from django.utils impor...
[ [ 8, 0, 0.0606, 0.1061, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1212, 0.0152, 0, 0.66, 0.3333, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 1, 0, 0.1364, 0.0152, 0, 0.66...
[ "\"\"\"\nThe GeometryProxy object, allows for lazy-geometries. The proxy uses\nPython descriptors for instantiating and setting Geometry objects\ncorresponding to geographic model fields.\n\nThanks to Robert Coup for providing this functionality (see #4322).\n\"\"\"", "from django.contrib.gis import memoryview",...
from django.db import connections from django.db.models.query import sql from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.db.models.sql import aggregates as gis_aggregates from django.contrib.gis.db.models.sql.conversion import AreaField, DistanceField, GeomField from django.contri...
[ [ 1, 0, 0.0083, 0.0083, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0165, 0.0083, 0, 0.66, 0.1, 793, 0, 1, 0, 0, 793, 0, 0 ], [ 1, 0, 0.0331, 0.0083, 0, 0.66,...
[ "from django.db import connections", "from django.db.models.query import sql", "from django.contrib.gis.db.models.fields import GeometryField", "from django.contrib.gis.db.models.sql import aggregates as gis_aggregates", "from django.contrib.gis.db.models.sql.conversion import AreaField, DistanceField, Geom...
try: from itertools import zip_longest except ImportError: from itertools import izip_longest as zip_longest from django.utils.six.moves import zip from django.db.backends.util import truncate_name, typecast_timestamp from django.db.models.sql import compiler from django.db.models.sql.constants import MULTI f...
[ [ 7, 0, 0.0084, 0.0134, 0, 0.66, 0, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 1, 0.0067, 0.0033, 1, 0.77, 0, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 1, 1, 0.0134, 0.0033, 1, 0.77, ...
[ "try:\n from itertools import zip_longest\nexcept ImportError:\n from itertools import izip_longest as zip_longest", " from itertools import zip_longest", " from itertools import izip_longest as zip_longest", "from django.utils.six.moves import zip", "from django.db.backends.util import truncate...
""" This module holds simple classes used by GeoQuery.convert_values to convert geospatial values from the database. """ class BaseField(object): empty_strings_allowed = True def get_internal_type(self): "Overloaded method so OracleQuery.convert_values doesn't balk." return None class AreaFiel...
[ [ 8, 0, 0.0926, 0.1481, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.2963, 0.1852, 0, 0.66, 0.25, 638, 0, 1, 0, 0, 186, 0, 0 ], [ 14, 1, 0.2593, 0.037, 1, 0.24, ...
[ "\"\"\"\nThis module holds simple classes used by GeoQuery.convert_values\nto convert geospatial values from the database.\n\"\"\"", "class BaseField(object):\n empty_strings_allowed = True\n def get_internal_type(self):\n \"Overloaded method so OracleQuery.convert_values doesn't balk.\"\n ret...
from django.db.models.sql.aggregates import * from django.contrib.gis.db.models.fields import GeometryField class GeoAggregate(Aggregate): # Default SQL template for spatial aggregates. sql_template = '%(function)s(%(field)s)' # Conversion class, if necessary. conversion_class = None # Flags for ...
[ [ 1, 0, 0.0167, 0.0167, 0, 0.66, 0, 101, 0, 1, 0, 0, 101, 0, 0 ], [ 1, 0, 0.0333, 0.0167, 0, 0.66, 0.1429, 708, 0, 1, 0, 0, 708, 0, 0 ], [ 3, 0, 0.4083, 0.7, 0, 0.6...
[ "from django.db.models.sql.aggregates import *", "from django.contrib.gis.db.models.fields import GeometryField", "class GeoAggregate(Aggregate):\n # Default SQL template for spatial aggregates.\n sql_template = '%(function)s(%(field)s)'\n\n # Conversion class, if necessary.\n conversion_class = Non...
from django.db.models.constants import LOOKUP_SEP from django.db.models.fields import FieldDoesNotExist from django.db.models.sql.expressions import SQLEvaluator from django.db.models.sql.where import Constraint, WhereNode from django.contrib.gis.db.models.fields import GeometryField class GeoConstraint(Constraint): ...
[ [ 1, 0, 0.0112, 0.0112, 0, 0.66, 0, 469, 0, 1, 0, 0, 469, 0, 0 ], [ 1, 0, 0.0225, 0.0112, 0, 0.66, 0.1667, 5, 0, 1, 0, 0, 5, 0, 0 ], [ 1, 0, 0.0337, 0.0112, 0, 0.66...
[ "from django.db.models.constants import LOOKUP_SEP", "from django.db.models.fields import FieldDoesNotExist", "from django.db.models.sql.expressions import SQLEvaluator", "from django.db.models.sql.where import Constraint, WhereNode", "from django.contrib.gis.db.models.fields import GeometryField", "class...
from django.contrib.gis.db.models.sql.conversion import AreaField, DistanceField, GeomField from django.contrib.gis.db.models.sql.query import GeoQuery from django.contrib.gis.db.models.sql.where import GeoWhereNode
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 100, 0, 3, 0, 0, 100, 0, 0 ], [ 1, 0, 0.6667, 0.3333, 0, 0.66, 0.5, 223, 0, 1, 0, 0, 223, 0, 0 ], [ 1, 0, 1, 0.3333, 0, 0.66, ...
[ "from django.contrib.gis.db.models.sql.conversion import AreaField, DistanceField, GeomField", "from django.contrib.gis.db.models.sql.query import GeoQuery", "from django.contrib.gis.db.models.sql.where import GeoWhereNode" ]
from django.db.models import Aggregate from django.contrib.gis.db.models.sql import GeomField class Collect(Aggregate): name = 'Collect' class Extent(Aggregate): name = 'Extent' class Extent3D(Aggregate): name = 'Extent3D' class MakeLine(Aggregate): name = 'MakeLine' class Union(Aggregate): nam...
[ [ 1, 0, 0.0588, 0.0588, 0, 0.66, 0, 680, 0, 1, 0, 0, 680, 0, 0 ], [ 1, 0, 0.1176, 0.0588, 0, 0.66, 0.1667, 437, 0, 1, 0, 0, 437, 0, 0 ], [ 3, 0, 0.2647, 0.1176, 0, ...
[ "from django.db.models import Aggregate", "from django.contrib.gis.db.models.sql import GeomField", "class Collect(Aggregate):\n name = 'Collect'", " name = 'Collect'", "class Extent(Aggregate):\n name = 'Extent'", " name = 'Extent'", "class Extent3D(Aggregate):\n name = 'Extent3D'", " ...
# Want to get everything from the 'normal' models package. from django.db.models import * # Geographic aggregate functions from django.contrib.gis.db.models.aggregates import * # The GeoManager from django.contrib.gis.db.models.manager import GeoManager # The geographic-enabled fields. from django.contrib.gis.db.mod...
[ [ 1, 0, 0.1429, 0.0714, 0, 0.66, 0, 680, 0, 1, 0, 0, 680, 0, 0 ], [ 1, 0, 0.3571, 0.0714, 0, 0.66, 0.3333, 920, 0, 1, 0, 0, 920, 0, 0 ], [ 1, 0, 0.5714, 0.0714, 0, ...
[ "from django.db.models import *", "from django.contrib.gis.db.models.aggregates import *", "from django.contrib.gis.db.models.manager import GeoManager", "from django.contrib.gis.db.models.fields import (\n GeometryField, PointField, LineStringField, PolygonField,\n MultiPointField, MultiLineStringFie...
from django.db.models.manager import Manager from django.contrib.gis.db.models.query import GeoQuerySet class GeoManager(Manager): "Overrides Manager to return Geographic QuerySets." # This manager should be used for queries on related fields # so that geometry columns on Oracle and MySQL are selected ...
[ [ 1, 0, 0.0097, 0.0097, 0, 0.66, 0, 59, 0, 1, 0, 0, 59, 0, 0 ], [ 1, 0, 0.0194, 0.0097, 0, 0.66, 0.5, 817, 0, 1, 0, 0, 817, 0, 0 ], [ 3, 0, 0.5194, 0.9709, 0, 0.66,...
[ "from django.db.models.manager import Manager", "from django.contrib.gis.db.models.query import GeoQuerySet", "class GeoManager(Manager):\n \"Overrides Manager to return Geographic QuerySets.\"\n\n # This manager should be used for queries on related fields\n # so that geometry columns on Oracle and My...
from MySQLdb.constants import FIELD_TYPE from django.contrib.gis.gdal import OGRGeomType from django.db.backends.mysql.introspection import DatabaseIntrospection class MySQLIntrospection(DatabaseIntrospection): # Updating the data_types_reverse dictionary with the appropriate # type for Geometry fields. d...
[ [ 1, 0, 0.0312, 0.0312, 0, 0.66, 0, 412, 0, 1, 0, 0, 412, 0, 0 ], [ 1, 0, 0.0938, 0.0312, 0, 0.66, 0.3333, 793, 0, 1, 0, 0, 793, 0, 0 ], [ 1, 0, 0.125, 0.0312, 0, 0...
[ "from MySQLdb.constants import FIELD_TYPE", "from django.contrib.gis.gdal import OGRGeomType", "from django.db.backends.mysql.introspection import DatabaseIntrospection", "class MySQLIntrospection(DatabaseIntrospection):\n # Updating the data_types_reverse dictionary with the appropriate\n # type for Ge...
from django.contrib.gis.db.models.sql.compiler import GeoSQLCompiler as BaseGeoSQLCompiler from django.db.backends.mysql import compiler SQLCompiler = compiler.SQLCompiler class GeoSQLCompiler(BaseGeoSQLCompiler, SQLCompiler): def resolve_columns(self, row, fields=()): """ Integrate the cases hand...
[ [ 1, 0, 0.0312, 0.0312, 0, 0.66, 0, 973, 0, 1, 0, 0, 973, 0, 0 ], [ 1, 0, 0.0625, 0.0312, 0, 0.66, 0.125, 937, 0, 1, 0, 0, 937, 0, 0 ], [ 14, 0, 0.125, 0.0312, 0, 0...
[ "from django.contrib.gis.db.models.sql.compiler import GeoSQLCompiler as BaseGeoSQLCompiler", "from django.db.backends.mysql import compiler", "SQLCompiler = compiler.SQLCompiler", "class GeoSQLCompiler(BaseGeoSQLCompiler, SQLCompiler):\n def resolve_columns(self, row, fields=()):\n \"\"\"\n ...
from django.db.backends.mysql.base import DatabaseOperations from django.contrib.gis.db.backends.adapter import WKTAdapter from django.contrib.gis.db.backends.base import BaseSpatialOperations from django.utils import six class MySQLOperations(DatabaseOperations, BaseSpatialOperations): compiler_module = 'djang...
[ [ 1, 0, 0.0149, 0.0149, 0, 0.66, 0, 150, 0, 1, 0, 0, 150, 0, 0 ], [ 1, 0, 0.0448, 0.0149, 0, 0.66, 0.25, 423, 0, 1, 0, 0, 423, 0, 0 ], [ 1, 0, 0.0597, 0.0149, 0, 0....
[ "from django.db.backends.mysql.base import DatabaseOperations", "from django.contrib.gis.db.backends.adapter import WKTAdapter", "from django.contrib.gis.db.backends.base import BaseSpatialOperations", "from django.utils import six", "class MySQLOperations(DatabaseOperations, BaseSpatialOperations):\n\n ...
from django.db.backends.mysql.creation import DatabaseCreation class MySQLCreation(DatabaseCreation): def sql_indexes_for_field(self, model, f, style): from django.contrib.gis.db.models.fields import GeometryField output = super(MySQLCreation, self).sql_indexes_for_field(model, f, style) ...
[ [ 1, 0, 0.0556, 0.0556, 0, 0.66, 0, 326, 0, 1, 0, 0, 326, 0, 0 ], [ 3, 0, 0.5833, 0.8889, 0, 0.66, 1, 391, 0, 1, 0, 0, 625, 0, 12 ], [ 2, 1, 0.6389, 0.7778, 1, 0.98...
[ "from django.db.backends.mysql.creation import DatabaseCreation", "class MySQLCreation(DatabaseCreation):\n\n def sql_indexes_for_field(self, model, f, style):\n from django.contrib.gis.db.models.fields import GeometryField\n output = super(MySQLCreation, self).sql_indexes_for_field(model, f, sty...
from django.db.backends.mysql.base import * from django.db.backends.mysql.base import DatabaseWrapper as MySQLDatabaseWrapper from django.contrib.gis.db.backends.mysql.creation import MySQLCreation from django.contrib.gis.db.backends.mysql.introspection import MySQLIntrospection from django.contrib.gis.db.backends.mysq...
[ [ 1, 0, 0.0769, 0.0769, 0, 0.66, 0, 150, 0, 1, 0, 0, 150, 0, 0 ], [ 1, 0, 0.1538, 0.0769, 0, 0.66, 0.2, 150, 0, 1, 0, 0, 150, 0, 0 ], [ 1, 0, 0.2308, 0.0769, 0, 0.6...
[ "from django.db.backends.mysql.base import *", "from django.db.backends.mysql.base import DatabaseWrapper as MySQLDatabaseWrapper", "from django.contrib.gis.db.backends.mysql.creation import MySQLCreation", "from django.contrib.gis.db.backends.mysql.introspection import MySQLIntrospection", "from django.con...
class WKTAdapter(object): """ This provides an adaptor for Geometries sent to the MySQL and Oracle database backends. """ def __init__(self, geom): self.wkt = geom.wkt self.srid = geom.srid def __eq__(self, other): if not isinstance(other, WKTAdapter): return...
[ [ 3, 0, 0.5263, 1, 0, 0.66, 0, 868, 0, 4, 0, 0, 186, 0, 1 ], [ 8, 1, 0.1842, 0.2105, 1, 0.87, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 1, 0.3684, 0.1579, 1, 0.87, 0.25...
[ "class WKTAdapter(object):\n \"\"\"\n This provides an adaptor for Geometries sent to the\n MySQL and Oracle database backends.\n \"\"\"\n def __init__(self, geom):\n self.wkt = geom.wkt\n self.srid = geom.srid", " \"\"\"\n This provides an adaptor for Geometries sent to the\n ...
from django.contrib.gis.gdal import OGRGeomType from django.db.backends.sqlite3.introspection import DatabaseIntrospection, FlexibleFieldLookupDict from django.utils import six class GeoFlexibleFieldLookupDict(FlexibleFieldLookupDict): """ Sublcass that includes updates the `base_data_types_reverse` dict f...
[ [ 1, 0, 0.0192, 0.0192, 0, 0.66, 0, 793, 0, 1, 0, 0, 793, 0, 0 ], [ 1, 0, 0.0385, 0.0192, 0, 0.66, 0.25, 774, 0, 2, 0, 0, 774, 0, 0 ], [ 1, 0, 0.0577, 0.0192, 0, 0....
[ "from django.contrib.gis.gdal import OGRGeomType", "from django.db.backends.sqlite3.introspection import DatabaseIntrospection, FlexibleFieldLookupDict", "from django.utils import six", "class GeoFlexibleFieldLookupDict(FlexibleFieldLookupDict):\n \"\"\"\n Sublcass that includes updates the `base_data_t...
from django.db.backends.sqlite3.base import Database from django.contrib.gis.db.backends.adapter import WKTAdapter class SpatiaLiteAdapter(WKTAdapter): "SQLite adaptor for geometry objects." def __conform__(self, protocol): if protocol is Database.PrepareProtocol: return str(self)
[ [ 1, 0, 0.125, 0.125, 0, 0.66, 0, 460, 0, 1, 0, 0, 460, 0, 0 ], [ 1, 0, 0.25, 0.125, 0, 0.66, 0.5, 423, 0, 1, 0, 0, 423, 0, 0 ], [ 3, 0, 0.75, 0.625, 0, 0.66, 1...
[ "from django.db.backends.sqlite3.base import Database", "from django.contrib.gis.db.backends.adapter import WKTAdapter", "class SpatiaLiteAdapter(WKTAdapter):\n \"SQLite adaptor for geometry objects.\"\n def __conform__(self, protocol):\n if protocol is Database.PrepareProtocol:\n return...
from django.db.backends.sqlite3.client import DatabaseClient class SpatiaLiteClient(DatabaseClient): executable_name = 'spatialite'
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 3, 0, 0.7, 0.4, 0, 0.66, 1, 345, 0, 0, 0, 0, 207, 0, 0 ], [ 14, 1, 0.8, 0.2, 1, 0.69, 0, 723, ...
[ "from django.db.backends.sqlite3.client import DatabaseClient", "class SpatiaLiteClient(DatabaseClient):\n executable_name = 'spatialite'", " executable_name = 'spatialite'" ]
""" The GeometryColumns and SpatialRefSys models for the SpatiaLite backend. """ from django.db import models from django.contrib.gis.db.backends.base import SpatialRefSysMixin from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class GeometryColumns(models.Model): """ T...
[ [ 8, 0, 0.0323, 0.0484, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0645, 0.0161, 0, 0.66, 0.2, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0806, 0.0161, 0, 0.66, ...
[ "\"\"\"\n The GeometryColumns and SpatialRefSys models for the SpatiaLite backend.\n\"\"\"", "from django.db import models", "from django.contrib.gis.db.backends.base import SpatialRefSysMixin", "from django.utils.encoding import python_2_unicode_compatible", "class GeometryColumns(models.Model):\n \"\"\...
import re from decimal import Decimal from django.contrib.gis.db.backends.base import BaseSpatialOperations from django.contrib.gis.db.backends.util import SpatialOperation, SpatialFunction from django.contrib.gis.db.backends.spatialite.adapter import SpatiaLiteAdapter from django.contrib.gis.geometry.backend import G...
[ [ 1, 0, 0.0028, 0.0028, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0055, 0.0028, 0, 0.66, 0.0526, 349, 0, 1, 0, 0, 349, 0, 0 ], [ 1, 0, 0.011, 0.0028, 0, 0...
[ "import re", "from decimal import Decimal", "from django.contrib.gis.db.backends.base import BaseSpatialOperations", "from django.contrib.gis.db.backends.util import SpatialOperation, SpatialFunction", "from django.contrib.gis.db.backends.spatialite.adapter import SpatiaLiteAdapter", "from django.contrib....
import os from django.conf import settings from django.core.cache import get_cache from django.core.cache.backends.db import BaseDatabaseCache from django.core.exceptions import ImproperlyConfigured from django.db.backends.sqlite3.creation import DatabaseCreation class SpatiaLiteCreation(DatabaseCreation): def cr...
[ [ 1, 0, 0.0077, 0.0077, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0154, 0.0077, 0, 0.66, 0.1667, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0231, 0.0077, 0, ...
[ "import os", "from django.conf import settings", "from django.core.cache import get_cache", "from django.core.cache.backends.db import BaseDatabaseCache", "from django.core.exceptions import ImproperlyConfigured", "from django.db.backends.sqlite3.creation import DatabaseCreation", "class SpatiaLiteCreat...
from ctypes.util import find_library from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.backends.sqlite3.base import ( _sqlite_extract, _sqlite_date_trunc, _sqlite_regexp, _sqlite_format_dtdelta, connection_created, Database, DatabaseWrapper as SQLiteDatabas...
[ [ 1, 0, 0.0156, 0.0156, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0312, 0.0156, 0, 0.66, 0.125, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0625, 0.0156, 0, 0...
[ "from ctypes.util import find_library", "from django.conf import settings", "from django.core.exceptions import ImproperlyConfigured", "from django.db.backends.sqlite3.base import (\n _sqlite_extract, _sqlite_date_trunc, _sqlite_regexp, _sqlite_format_dtdelta,\n connection_created, Database, DatabaseWra...
from django.db.backends.postgresql_psycopg2.introspection import DatabaseIntrospection from django.contrib.gis.gdal import OGRGeomType class GeoIntrospectionError(Exception): pass class PostGISIntrospection(DatabaseIntrospection): # Reverse dictionary for PostGIS geometry types not populated until # intro...
[ [ 1, 0, 0.0105, 0.0105, 0, 0.66, 0, 862, 0, 1, 0, 0, 862, 0, 0 ], [ 1, 0, 0.0211, 0.0105, 0, 0.66, 0.3333, 793, 0, 1, 0, 0, 793, 0, 0 ], [ 3, 0, 0.0474, 0.0211, 0, ...
[ "from django.db.backends.postgresql_psycopg2.introspection import DatabaseIntrospection", "from django.contrib.gis.gdal import OGRGeomType", "class GeoIntrospectionError(Exception):\n pass", "class PostGISIntrospection(DatabaseIntrospection):\n # Reverse dictionary for PostGIS geometry types not populat...
""" This object provides quoting for GEOS geometries into PostgreSQL/PostGIS. """ from __future__ import unicode_literals from psycopg2 import Binary from psycopg2.extensions import ISQLQuote class PostGISAdapter(object): def __init__(self, geom): "Initializes on the geometry." # Getting the WKB ...
[ [ 8, 0, 0.0435, 0.0652, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.087, 0.0217, 0, 0.66, 0.25, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1304, 0.0217, 0, 0.66, ...
[ "\"\"\"\n This object provides quoting for GEOS geometries into PostgreSQL/PostGIS.\n\"\"\"", "from __future__ import unicode_literals", "from psycopg2 import Binary", "from psycopg2.extensions import ISQLQuote", "class PostGISAdapter(object):\n def __init__(self, geom):\n \"Initializes on the geo...
""" The GeometryColumns and SpatialRefSys models for the PostGIS backend. """ from django.db import models from django.contrib.gis.db.backends.base import SpatialRefSysMixin from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class GeometryColumns(models.Model): """ The ...
[ [ 8, 0, 0.0294, 0.0441, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0588, 0.0147, 0, 0.66, 0.2, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0735, 0.0147, 0, 0.66, ...
[ "\"\"\"\n The GeometryColumns and SpatialRefSys models for the PostGIS backend.\n\"\"\"", "from django.db import models", "from django.contrib.gis.db.backends.base import SpatialRefSysMixin", "from django.utils.encoding import python_2_unicode_compatible", "class GeometryColumns(models.Model):\n \"\"\"\n...
import re from decimal import Decimal from django.conf import settings from django.contrib.gis.db.backends.base import BaseSpatialOperations from django.contrib.gis.db.backends.util import SpatialOperation, SpatialFunction from django.contrib.gis.db.backends.postgis.adapter import PostGISAdapter from django.contrib.gi...
[ [ 1, 0, 0.0017, 0.0017, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0034, 0.0017, 0, 0.66, 0.0526, 349, 0, 1, 0, 0, 349, 0, 0 ], [ 1, 0, 0.0068, 0.0017, 0, ...
[ "import re", "from decimal import Decimal", "from django.conf import settings", "from django.contrib.gis.db.backends.base import BaseSpatialOperations", "from django.contrib.gis.db.backends.util import SpatialOperation, SpatialFunction", "from django.contrib.gis.db.backends.postgis.adapter import PostGISA...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.backends.postgresql_psycopg2.creation import DatabaseCreation from django.utils.functional import cached_property class PostGISCreation(DatabaseCreation): geom_index_type = 'GIST' geom_index_ops = 'GIST_GEO...
[ [ 1, 0, 0.0104, 0.0104, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0208, 0.0104, 0, 0.66, 0.25, 160, 0, 1, 0, 0, 160, 0, 0 ], [ 1, 0, 0.0312, 0.0104, 0, 0....
[ "from django.conf import settings", "from django.core.exceptions import ImproperlyConfigured", "from django.db.backends.postgresql_psycopg2.creation import DatabaseCreation", "from django.utils.functional import cached_property", "class PostGISCreation(DatabaseCreation):\n geom_index_type = 'GIST'\n g...
from django.db.backends.postgresql_psycopg2.base import * from django.db.backends.postgresql_psycopg2.base import DatabaseWrapper as Psycopg2DatabaseWrapper from django.contrib.gis.db.backends.postgis.creation import PostGISCreation from django.contrib.gis.db.backends.postgis.introspection import PostGISIntrospection f...
[ [ 1, 0, 0.0833, 0.0833, 0, 0.66, 0, 485, 0, 1, 0, 0, 485, 0, 0 ], [ 1, 0, 0.1667, 0.0833, 0, 0.66, 0.2, 485, 0, 1, 0, 0, 485, 0, 0 ], [ 1, 0, 0.25, 0.0833, 0, 0.66,...
[ "from django.db.backends.postgresql_psycopg2.base import *", "from django.db.backends.postgresql_psycopg2.base import DatabaseWrapper as Psycopg2DatabaseWrapper", "from django.contrib.gis.db.backends.postgis.creation import PostGISCreation", "from django.contrib.gis.db.backends.postgis.introspection import Po...
""" A collection of utility routines and classes used by the spatial backends. """ class SpatialOperation(object): """ Base class for generating spatial SQL. """ sql_template = '%(geo_col)s %(operator)s %(geometry)s' def __init__(self, function='', operator='', result='', **kwargs): self.f...
[ [ 8, 0, 0.0568, 0.0909, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.3977, 0.5455, 0, 0.66, 0.5, 191, 0, 3, 0, 0, 186, 0, 2 ], [ 8, 1, 0.1818, 0.0682, 1, 0.48, ...
[ "\"\"\"\nA collection of utility routines and classes used by the spatial\nbackends.\n\"\"\"", "class SpatialOperation(object):\n \"\"\"\n Base class for generating spatial SQL.\n \"\"\"\n sql_template = '%(geo_col)s %(operator)s %(geometry)s'\n\n def __init__(self, function='', operator='', result...
""" Base/mixin classes for the spatial backend database operations and the `SpatialRefSys` model the backend. """ import re from django.contrib.gis import gdal from django.utils import six from django.utils.encoding import python_2_unicode_compatible class BaseSpatialOperations(object): """ This module holds t...
[ [ 8, 0, 0.0072, 0.0115, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0144, 0.0029, 0, 0.66, 0.1667, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0173, 0.0029, 0, 0.66...
[ "\"\"\"\nBase/mixin classes for the spatial backend database operations and the\n`SpatialRefSys` model the backend.\n\"\"\"", "import re", "from django.contrib.gis import gdal", "from django.utils import six", "from django.utils.encoding import python_2_unicode_compatible", "class BaseSpatialOperations(ob...
import cx_Oracle from django.db.backends.oracle.introspection import DatabaseIntrospection class OracleIntrospection(DatabaseIntrospection): # Associating any OBJECTVAR instances with GeometryField. Of course, # this won't work right on Oracle objects that aren't MDSYS.SDO_GEOMETRY, # but it is the only o...
[ [ 1, 0, 0.0256, 0.0256, 0, 0.66, 0, 554, 0, 1, 0, 0, 554, 0, 0 ], [ 1, 0, 0.0513, 0.0256, 0, 0.66, 0.5, 272, 0, 1, 0, 0, 272, 0, 0 ], [ 3, 0, 0.5513, 0.9231, 0, 0.6...
[ "import cx_Oracle", "from django.db.backends.oracle.introspection import DatabaseIntrospection", "class OracleIntrospection(DatabaseIntrospection):\n # Associating any OBJECTVAR instances with GeometryField. Of course,\n # this won't work right on Oracle objects that aren't MDSYS.SDO_GEOMETRY,\n # but...
from django.contrib.gis.db.models.sql.compiler import GeoSQLCompiler as BaseGeoSQLCompiler from django.db.backends.oracle import compiler SQLCompiler = compiler.SQLCompiler class GeoSQLCompiler(BaseGeoSQLCompiler, SQLCompiler): pass class SQLInsertCompiler(compiler.SQLInsertCompiler, GeoSQLCompiler): pass c...
[ [ 1, 0, 0.0455, 0.0455, 0, 0.66, 0, 973, 0, 1, 0, 0, 973, 0, 0 ], [ 1, 0, 0.0909, 0.0455, 0, 0.66, 0.125, 772, 0, 1, 0, 0, 772, 0, 0 ], [ 14, 0, 0.1818, 0.0455, 0, ...
[ "from django.contrib.gis.db.models.sql.compiler import GeoSQLCompiler as BaseGeoSQLCompiler", "from django.db.backends.oracle import compiler", "SQLCompiler = compiler.SQLCompiler", "class GeoSQLCompiler(BaseGeoSQLCompiler, SQLCompiler):\n pass", "class SQLInsertCompiler(compiler.SQLInsertCompiler, GeoSQ...
from cx_Oracle import CLOB from django.contrib.gis.db.backends.adapter import WKTAdapter class OracleSpatialAdapter(WKTAdapter): input_size = CLOB
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 554, 0, 1, 0, 0, 554, 0, 0 ], [ 1, 0, 0.4, 0.2, 0, 0.66, 0.5, 423, 0, 1, 0, 0, 423, 0, 0 ], [ 3, 0, 0.9, 0.4, 0, 0.66, 1, 930,...
[ "from cx_Oracle import CLOB", "from django.contrib.gis.db.backends.adapter import WKTAdapter", "class OracleSpatialAdapter(WKTAdapter):\n input_size = CLOB", " input_size = CLOB" ]
""" The GeometryColumns and SpatialRefSys models for the Oracle spatial backend. It should be noted that Oracle Spatial does not have database tables named according to the OGC standard, so the closest analogs are used. For example, the `USER_SDO_GEOM_METADATA` is used for the GeometryColumns model and the `SDO_...
[ [ 8, 0, 0.0758, 0.1364, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1515, 0.0152, 0, 0.66, 0.2, 964, 0, 1, 0, 0, 964, 0, 0 ], [ 1, 0, 0.1667, 0.0152, 0, 0.66, ...
[ "\"\"\"\n The GeometryColumns and SpatialRefSys models for the Oracle spatial\n backend.\n\n It should be noted that Oracle Spatial does not have database tables\n named according to the OGC standard, so the closest analogs are used.\n For example, the `USER_SDO_GEOM_METADATA` is used for the GeometryColumns\n mode...
""" This module contains the spatial lookup types, and the `get_geo_where_clause` routine for Oracle Spatial. Please note that WKT support is broken on the XE version, and thus this backend will not work on such platforms. Specifically, XE lacks support for an internal JVM, and Java libraries are required to use...
[ [ 8, 0, 0.0167, 0.0301, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0334, 0.0033, 0, 0.66, 0.0625, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0368, 0.0033, 0, 0.66...
[ "\"\"\"\n This module contains the spatial lookup types, and the `get_geo_where_clause`\n routine for Oracle Spatial.\n\n Please note that WKT support is broken on the XE version, and thus\n this backend will not work on such platforms. Specifically, XE lacks\n support for an internal JVM, and Java libraries are r...
from django.db.backends.oracle.creation import DatabaseCreation from django.db.backends.util import truncate_name class OracleCreation(DatabaseCreation): def sql_indexes_for_field(self, model, f, style): "Return any spatial index creation SQL for the field." from django.contrib.gis.db.models.field...
[ [ 1, 0, 0.0238, 0.0238, 0, 0.66, 0, 513, 0, 1, 0, 0, 513, 0, 0 ], [ 1, 0, 0.0476, 0.0238, 0, 0.66, 0.5, 446, 0, 1, 0, 0, 446, 0, 0 ], [ 3, 0, 0.5476, 0.9286, 0, 0.6...
[ "from django.db.backends.oracle.creation import DatabaseCreation", "from django.db.backends.util import truncate_name", "class OracleCreation(DatabaseCreation):\n\n def sql_indexes_for_field(self, model, f, style):\n \"Return any spatial index creation SQL for the field.\"\n from django.contrib...
from django.db.backends.oracle.base import * from django.db.backends.oracle.base import DatabaseWrapper as OracleDatabaseWrapper from django.contrib.gis.db.backends.oracle.creation import OracleCreation from django.contrib.gis.db.backends.oracle.introspection import OracleIntrospection from django.contrib.gis.db.backen...
[ [ 1, 0, 0.0833, 0.0833, 0, 0.66, 0, 759, 0, 1, 0, 0, 759, 0, 0 ], [ 1, 0, 0.1667, 0.0833, 0, 0.66, 0.2, 759, 0, 1, 0, 0, 759, 0, 0 ], [ 1, 0, 0.25, 0.0833, 0, 0.66,...
[ "from django.db.backends.oracle.base import *", "from django.db.backends.oracle.base import DatabaseWrapper as OracleDatabaseWrapper", "from django.contrib.gis.db.backends.oracle.creation import OracleCreation", "from django.contrib.gis.db.backends.oracle.introspection import OracleIntrospection", "from dja...
# Quick tests for the markup templatetags (django.contrib.markup) import re import warnings from django.template import Template, Context from django import test from django.utils import unittest from django.utils.html import escape try: import textile except ImportError: textile = None try: import markd...
[ [ 1, 0, 0.0185, 0.0093, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0278, 0.0093, 0, 0.66, 0.1111, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 1, 0, 0.0463, 0.0093, 0, ...
[ "import re", "import warnings", "from django.template import Template, Context", "from django import test", "from django.utils import unittest", "from django.utils.html import escape", "try:\n import textile\nexcept ImportError:\n textile = None", " import textile", " textile = None", ...
""" Set of "markup" template filters for Django. These filters transform plain text markup syntaxes to HTML; currently there is support for: * Textile, which requires the PyTextile library available at http://loopcore.com/python-textile/ * Markdown, which requires the Python-markdown library from ...
[ [ 8, 0, 0.0722, 0.1333, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1556, 0.0111, 0, 0.66, 0.125, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.1667, 0.0111, 0, 0.66,...
[ "\"\"\"\nSet of \"markup\" template filters for Django. These filters transform plain text\nmarkup syntaxes to HTML; currently there is support for:\n\n * Textile, which requires the PyTextile library available at\n http://loopcore.com/python-textile/\n\n * Markdown, which requires the Python-markdown l...
from django.db import models from django.utils.translation import ugettext_lazy as _ class SessionManager(models.Manager): def encode(self, session_dict): """ Returns the given session dictionary serialized and encoded as a string. """ return SessionStore().encode(session_dict) ...
[ [ 1, 0, 0.0185, 0.0185, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.037, 0.0185, 0, 0.66, 0.25, 389, 0, 1, 0, 0, 389, 0, 0 ], [ 3, 0, 0.213, 0.2593, 0, 0.66, ...
[ "from django.db import models", "from django.utils.translation import ugettext_lazy as _", "class SessionManager(models.Manager):\n def encode(self, session_dict):\n \"\"\"\n Returns the given session dictionary serialized and encoded as a string.\n \"\"\"\n return SessionStore()....
from datetime import timedelta import os import shutil import string import tempfile import warnings from django.conf import settings from django.contrib.sessions.backends.db import SessionStore as DatabaseSession from django.contrib.sessions.backends.cache import SessionStore as CacheSession from django.contrib.sessi...
[ [ 1, 0, 0.0017, 0.0017, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0035, 0.0017, 0, 0.66, 0.0323, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0052, 0.0017, 0, ...
[ "from datetime import timedelta", "import os", "import shutil", "import string", "import tempfile", "import warnings", "from django.conf import settings", "from django.contrib.sessions.backends.db import SessionStore as DatabaseSession", "from django.contrib.sessions.backends.cache import SessionSto...
import time from django.conf import settings from django.utils.cache import patch_vary_headers from django.utils.http import cookie_date from django.utils.importlib import import_module class SessionMiddleware(object): def process_request(self, request): engine = import_module(settings.SESSION_ENGINE) ...
[ [ 1, 0, 0.0222, 0.0222, 0, 0.66, 0, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.0667, 0.0222, 0, 0.66, 0.2, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0889, 0.0222, 0, 0.6...
[ "import time", "from django.conf import settings", "from django.utils.cache import patch_vary_headers", "from django.utils.http import cookie_date", "from django.utils.importlib import import_module", "class SessionMiddleware(object):\n def process_request(self, request):\n engine = import_modul...
from django.core.signing import JSONSerializer as BaseJSONSerializer try: from django.utils.six.moves import cPickle as pickle except ImportError: import pickle class PickleSerializer(object): """ Simple wrapper around pickle to be used in signing.dumps and signing.loads. """ def dumps(sel...
[ [ 1, 0, 0.05, 0.05, 0, 0.66, 0, 460, 0, 1, 0, 0, 460, 0, 0 ], [ 7, 0, 0.175, 0.2, 0, 0.66, 0.3333, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 1, 0.15, 0.05, 1, 0.65, 0, ...
[ "from django.core.signing import JSONSerializer as BaseJSONSerializer", "try:\n from django.utils.six.moves import cPickle as pickle\nexcept ImportError:\n import pickle", " from django.utils.six.moves import cPickle as pickle", " import pickle", "class PickleSerializer(object):\n \"\"\"\n ...
from django.conf import settings from django.core.management.base import NoArgsCommand from django.utils.importlib import import_module class Command(NoArgsCommand): help = "Can be run as a cronjob or directly to clean out expired sessions (only with the database backend at the moment)." def handle_noargs(se...
[ [ 1, 0, 0.0667, 0.0667, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.1333, 0.0667, 0, 0.66, 0.3333, 931, 0, 1, 0, 0, 931, 0, 0 ], [ 1, 0, 0.2, 0.0667, 0, 0.6...
[ "from django.conf import settings", "from django.core.management.base import NoArgsCommand", "from django.utils.importlib import import_module", "class Command(NoArgsCommand):\n help = \"Can be run as a cronjob or directly to clean out expired sessions (only with the database backend at the moment).\"\n\n ...
from django.conf import settings from django.core import signing from django.contrib.sessions.backends.base import SessionBase class SessionStore(SessionBase): def load(self): """ We load the data from the key itself instead of fetching from some external data store. Opposite of _get_ses...
[ [ 1, 0, 0.0123, 0.0123, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0247, 0.0123, 0, 0.66, 0.3333, 913, 0, 1, 0, 0, 913, 0, 0 ], [ 1, 0, 0.0494, 0.0123, 0, ...
[ "from django.conf import settings", "from django.core import signing", "from django.contrib.sessions.backends.base import SessionBase", "class SessionStore(SessionBase):\n\n def load(self):\n \"\"\"\n We load the data from the key itself instead of fetching from\n some external data st...
import datetime import errno import os import tempfile from django.conf import settings from django.contrib.sessions.backends.base import SessionBase, CreateError, VALID_KEY_CHARS from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured from django.utils import timezone class SessionStore(SessionB...
[ [ 1, 0, 0.0053, 0.0053, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0106, 0.0053, 0, 0.66, 0.125, 546, 0, 1, 0, 0, 546, 0, 0 ], [ 1, 0, 0.0159, 0.0053, 0, 0...
[ "import datetime", "import errno", "import os", "import tempfile", "from django.conf import settings", "from django.contrib.sessions.backends.base import SessionBase, CreateError, VALID_KEY_CHARS", "from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured", "from django.utils impor...
from django.contrib.sessions.backends.base import SessionBase, CreateError from django.core.exceptions import SuspiciousOperation from django.db import IntegrityError, transaction, router from django.utils import timezone class SessionStore(SessionBase): """ Implements database session store. """ def ...
[ [ 1, 0, 0.0123, 0.0123, 0, 0.66, 0, 907, 0, 2, 0, 0, 907, 0, 0 ], [ 1, 0, 0.0247, 0.0123, 0, 0.66, 0.2, 160, 0, 1, 0, 0, 160, 0, 0 ], [ 1, 0, 0.037, 0.0123, 0, 0.66...
[ "from django.contrib.sessions.backends.base import SessionBase, CreateError", "from django.core.exceptions import SuspiciousOperation", "from django.db import IntegrityError, transaction, router", "from django.utils import timezone", "class SessionStore(SessionBase):\n \"\"\"\n Implements database ses...
from __future__ import unicode_literals import base64 from datetime import datetime, timedelta import string from django.conf import settings from django.core.exceptions import SuspiciousOperation from django.utils.crypto import constant_time_compare from django.utils.crypto import get_random_string from django.utils...
[ [ 1, 0, 0.0031, 0.0031, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0093, 0.0031, 0, 0.66, 0.0714, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.0125, 0.0031, 0, ...
[ "from __future__ import unicode_literals", "import base64", "from datetime import datetime, timedelta", "import string", "from django.conf import settings", "from django.core.exceptions import SuspiciousOperation", "from django.utils.crypto import constant_time_compare", "from django.utils.crypto impo...
""" Cached, database-backed sessions. """ from django.contrib.sessions.backends.db import SessionStore as DBStore from django.core.cache import cache from django.core.exceptions import SuspiciousOperation from django.utils import timezone KEY_PREFIX = "django.contrib.sessions.cached_db" class SessionStore(DBStore):...
[ [ 8, 0, 0.026, 0.039, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0649, 0.013, 0, 0.66, 0.1429, 857, 0, 1, 0, 0, 857, 0, 0 ], [ 1, 0, 0.0779, 0.013, 0, 0.66, ...
[ "\"\"\"\nCached, database-backed sessions.\n\"\"\"", "from django.contrib.sessions.backends.db import SessionStore as DBStore", "from django.core.cache import cache", "from django.core.exceptions import SuspiciousOperation", "from django.utils import timezone", "KEY_PREFIX = \"django.contrib.sessions.cach...
from django.conf import settings from django.contrib.sessions.backends.base import SessionBase, CreateError from django.core.cache import get_cache from django.utils.six.moves import xrange KEY_PREFIX = "django.contrib.sessions.cache" class SessionStore(SessionBase): """ A cache-based session store. """ ...
[ [ 1, 0, 0.0139, 0.0139, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0278, 0.0139, 0, 0.66, 0.2, 907, 0, 2, 0, 0, 907, 0, 0 ], [ 1, 0, 0.0417, 0.0139, 0, 0.6...
[ "from django.conf import settings", "from django.contrib.sessions.backends.base import SessionBase, CreateError", "from django.core.cache import get_cache", "from django.utils.six.moves import xrange", "KEY_PREFIX = \"django.contrib.sessions.cache\"", "class SessionStore(SessionBase):\n \"\"\"\n A c...
from __future__ import unicode_literals import datetime try: import pytz except ImportError: pytz = None from django.conf import settings from django.contrib.humanize.templatetags import humanize from django.template import Template, Context, defaultfilters from django.test import TestCase from django.test.ut...
[ [ 1, 0, 0.0044, 0.0044, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0088, 0.0044, 0, 0.66, 0.0625, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 7, 0, 0.0243, 0.0177, 0, ...
[ "from __future__ import unicode_literals", "import datetime", "try:\n import pytz\nexcept ImportError:\n pytz = None", " import pytz", " pytz = None", "from django.conf import settings", "from django.contrib.humanize.templatetags import humanize", "from django.template import Template, Con...
from __future__ import unicode_literals import re from datetime import date, datetime from django import template from django.conf import settings from django.template import defaultfilters from django.utils.encoding import force_text from django.utils.formats import number_format from django.utils.translation import ...
[ [ 1, 0, 0.0044, 0.0044, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0087, 0.0044, 0, 0.66, 0.0588, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0131, 0.0044, 0, ...
[ "from __future__ import unicode_literals", "import re", "from datetime import date, datetime", "from django import template", "from django.conf import settings", "from django.template import defaultfilters", "from django.utils.encoding import force_text", "from django.utils.formats import number_forma...
# Empty models.py to allow for specifying databrowse as a test label.
[]
[]
from django.contrib import databrowse from django.db import models from django.test import TestCase from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class SomeModel(models.Model): some_field = models.CharField(max_length=50) def __str__(self): return self.som...
[ [ 1, 0, 0.0161, 0.0161, 0, 0.66, 0, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.0323, 0.0161, 0, 0.66, 0.1429, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0484, 0.0161, 0, 0....
[ "from django.contrib import databrowse", "from django.db import models", "from django.test import TestCase", "from django.utils.encoding import python_2_unicode_compatible", "class SomeModel(models.Model):\n some_field = models.CharField(max_length=50)\n\n def __str__(self):\n return self.some_...
from django.conf.urls import patterns from django.contrib.databrowse import views # Note: The views in this URLconf all require a 'models' argument, # which is a list of model classes (*not* instances). urlpatterns = patterns('', #(r'^$', views.homepage), #(r'^([^/]+)/([^/]+)/$', views.model_detail), (r'...
[ [ 1, 0, 0.05, 0.05, 0, 0.66, 0, 528, 0, 1, 0, 0, 528, 0, 0 ], [ 1, 0, 0.1, 0.05, 0, 0.66, 0.5, 706, 0, 1, 0, 0, 706, 0, 0 ], [ 14, 0, 0.675, 0.7, 0, 0.66, 1, ...
[ "from django.conf.urls import patterns", "from django.contrib.databrowse import views", "urlpatterns = patterns('',\n #(r'^$', views.homepage),\n #(r'^([^/]+)/([^/]+)/$', views.model_detail),\n\n (r'^([^/]+)/([^/]+)/fields/(\\w+)/$', views.choice_list),\n (r'^([^/]+)/([^/]+)/fields/(\\w+)/(.*)/$', v...
from __future__ import unicode_literals from django import http from django.db import models from django.contrib.databrowse.datastructures import EasyModel from django.contrib.databrowse.sites import DatabrowsePlugin from django.shortcuts import render_to_response from django.utils.html import format_html, format_html...
[ [ 1, 0, 0.0068, 0.0068, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0204, 0.0068, 0, 0.66, 0.0625, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.0272, 0.0068, 0, ...
[ "from __future__ import unicode_literals", "from django import http", "from django.db import models", "from django.contrib.databrowse.datastructures import EasyModel", "from django.contrib.databrowse.sites import DatabrowsePlugin", "from django.shortcuts import render_to_response", "from django.utils.ht...
from __future__ import unicode_literals from django import http from django.db import models from django.contrib.databrowse.datastructures import EasyModel from django.contrib.databrowse.sites import DatabrowsePlugin from django.shortcuts import render_to_response from django.utils.html import format_html, format_html...
[ [ 1, 0, 0.013, 0.013, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.039, 0.013, 0, 0.66, 0.1, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.0519, 0.013, 0, 0.66, ...
[ "from __future__ import unicode_literals", "from django import http", "from django.db import models", "from django.contrib.databrowse.datastructures import EasyModel", "from django.contrib.databrowse.sites import DatabrowsePlugin", "from django.shortcuts import render_to_response", "from django.utils.ht...
try: from urllib.parse import urljoin except ImportError: # Python 2 from urlparse import urljoin from django import http from django.contrib.databrowse.datastructures import EasyModel from django.contrib.databrowse.sites import DatabrowsePlugin from django.shortcuts import render_to_response class Object...
[ [ 7, 0, 0.1389, 0.2222, 0, 0.66, 0, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 1, 0.1111, 0.0556, 1, 0.02, 0, 630, 0, 1, 0, 0, 630, 0, 0 ], [ 1, 1, 0.2222, 0.0556, 1, 0.02, ...
[ "try:\n from urllib.parse import urljoin\nexcept ImportError: # Python 2\n from urlparse import urljoin", " from urllib.parse import urljoin", " from urlparse import urljoin", "from django import http", "from django.contrib.databrowse.datastructures import EasyModel", "from django.contrib....
from __future__ import unicode_literals from django import http from django.db import models from django.contrib.databrowse.datastructures import EasyModel from django.shortcuts import render_to_response from django.utils.safestring import mark_safe class AlreadyRegistered(Exception): pass class NotRegistered(Ex...
[ [ 1, 0, 0.0068, 0.0068, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0204, 0.0068, 0, 0.66, 0.0667, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.0272, 0.0068, 0, ...
[ "from __future__ import unicode_literals", "from django import http", "from django.db import models", "from django.contrib.databrowse.datastructures import EasyModel", "from django.shortcuts import render_to_response", "from django.utils.safestring import mark_safe", "class AlreadyRegistered(Exception):...
from django.http import Http404 from django.shortcuts import render_to_response ########### # CHOICES # ########### def choice_list(request, app_label, module_name, field_name, models): m, f = lookup_field(app_label, module_name, field_name, models) return render_to_response('databrowse/choice_list.html', {'m...
[ [ 1, 0, 0.0526, 0.0526, 0, 0.66, 0, 779, 0, 1, 0, 0, 779, 0, 0 ], [ 1, 0, 0.1053, 0.0526, 0, 0.66, 0.3333, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 2, 0, 0.4737, 0.1579, 0, ...
[ "from django.http import Http404", "from django.shortcuts import render_to_response", "def choice_list(request, app_label, module_name, field_name, models):\n m, f = lookup_field(app_label, module_name, field_name, models)\n return render_to_response('databrowse/choice_list.html', {'model': m, 'field': f}...
import warnings from django.contrib.databrowse.sites import DatabrowsePlugin, ModelDatabrowse, DatabrowseSite, site warnings.warn("The Databrowse contrib app is deprecated", DeprecationWarning)
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 1, 0, 0.4, 0.2, 0, 0.66, 0.5, 231, 0, 4, 0, 0, 231, 0, 0 ], [ 8, 0, 1, 0.2, 0, 0.66, 1, 960, ...
[ "import warnings", "from django.contrib.databrowse.sites import DatabrowsePlugin, ModelDatabrowse, DatabrowseSite, site", "warnings.warn(\"The Databrowse contrib app is deprecated\", DeprecationWarning)" ]
""" These classes are light wrappers around Django's database API that provide convenience functionality and permalink functions for the databrowse app. """ from __future__ import unicode_literals from django.db import models from django.utils import formats from django.utils.text import capfirst from django.utils.enc...
[ [ 8, 0, 0.0117, 0.0187, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0234, 0.0047, 0, 0.66, 0.0667, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0327, 0.0047, 0, 0.66...
[ "\"\"\"\nThese classes are light wrappers around Django's database API that provide\nconvenience functionality and permalink functions for the databrowse app.\n\"\"\"", "from __future__ import unicode_literals", "from django.db import models", "from django.utils import formats", "from django.utils.text impo...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import unittest from django.contrib.webdesign.lorem_ipsum import * from django.template import loader, Context class WebdesignTest(unittest.TestCase): def test_words(self): self.assertEqual(words(7), 'lorem ipsum dolor sit amet consectetur...
[ [ 1, 0, 0.0909, 0.0455, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1818, 0.0455, 0, 0.66, 0.25, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.2727, 0.0455, 0, 0.66...
[ "from __future__ import unicode_literals", "import unittest", "from django.contrib.webdesign.lorem_ipsum import *", "from django.template import loader, Context", "class WebdesignTest(unittest.TestCase):\n\n def test_words(self):\n self.assertEqual(words(7), 'lorem ipsum dolor sit amet consectetur...
""" Utility functions for generating "lorem ipsum" Latin text. """ from __future__ import unicode_literals import random COMMON_P = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco ...
[ [ 8, 0, 0.0194, 0.0291, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0485, 0.0097, 0, 0.66, 0.1111, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.068, 0.0097, 0, 0.66,...
[ "\"\"\"\nUtility functions for generating \"lorem ipsum\" Latin text.\n\"\"\"", "from __future__ import unicode_literals", "import random", "COMMON_P = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis no...
from __future__ import unicode_literals from django.contrib.webdesign.lorem_ipsum import words, paragraphs from django import template register = template.Library() class LoremNode(template.Node): def __init__(self, count, method, common): self.count, self.method, self.common = count, method, common ...
[ [ 1, 0, 0.0147, 0.0147, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0441, 0.0147, 0, 0.66, 0.2, 74, 0, 2, 0, 0, 74, 0, 0 ], [ 1, 0, 0.0588, 0.0147, 0, 0.66,...
[ "from __future__ import unicode_literals", "from django.contrib.webdesign.lorem_ipsum import words, paragraphs", "from django import template", "register = template.Library()", "class LoremNode(template.Node):\n def __init__(self, count, method, common):\n self.count, self.method, self.common = co...
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_text, force_text from django.utils.encoding import python_2_unicode_compatible class ContentTypeManager(models.Manager): # Cache to avoid re-looking up ContentType objects all over the plac...
[ [ 1, 0, 0.0057, 0.0057, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0114, 0.0057, 0, 0.66, 0.2, 389, 0, 1, 0, 0, 389, 0, 0 ], [ 1, 0, 0.017, 0.0057, 0, 0.66, ...
[ "from django.db import models", "from django.utils.translation import ugettext_lazy as _", "from django.utils.encoding import smart_text, force_text", "from django.utils.encoding import python_2_unicode_compatible", "class ContentTypeManager(models.Manager):\n\n # Cache to avoid re-looking up ContentType...
from __future__ import unicode_literals from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.views import shortcut from django.contrib.sites.models import Site, get_current_site from django.http import HttpRequest, Http404 from django.test import Test...
[ [ 1, 0, 0.0036, 0.0036, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0109, 0.0036, 0, 0.66, 0.0625, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0145, 0.0036, 0, 0....
[ "from __future__ import unicode_literals", "from django.db import models", "from django.contrib.contenttypes.models import ContentType", "from django.contrib.contenttypes.views import shortcut", "from django.contrib.sites.models import Site, get_current_site", "from django.http import HttpRequest, Http404...
""" Classes allowing "generic" relations through ContentType and object-id fields. """ from __future__ import unicode_literals from collections import defaultdict from functools import partial from django.core.exceptions import ObjectDoesNotExist from django.db import connection from django.db.models import signals f...
[ [ 8, 0, 0.004, 0.006, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.008, 0.002, 0, 0.66, 0.0417, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.012, 0.002, 0, 0.66, ...
[ "\"\"\"\nClasses allowing \"generic\" relations through ContentType and object-id fields.\n\"\"\"", "from __future__ import unicode_literals", "from collections import defaultdict", "from functools import partial", "from django.core.exceptions import ObjectDoesNotExist", "from django.db import connection"...
from __future__ import unicode_literals from django import http from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site, get_current_site from django.core.exceptions import ObjectDoesNotExist from django.utils.translation import ugettext as _ def shortcut(request, conte...
[ [ 1, 0, 0.0122, 0.0122, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0366, 0.0122, 0, 0.66, 0.1667, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.0488, 0.0122, 0, ...
[ "from __future__ import unicode_literals", "from django import http", "from django.contrib.contenttypes.models import ContentType", "from django.contrib.sites.models import Site, get_current_site", "from django.core.exceptions import ObjectDoesNotExist", "from django.utils.translation import ugettext as _...
from django.contrib.contenttypes.models import ContentType from django.db import DEFAULT_DB_ALIAS, router from django.db.models import get_apps, get_models, signals from django.utils.encoding import smart_text from django.utils import six from django.utils.six.moves import input def update_contenttypes(app, created_m...
[ [ 1, 0, 0.0112, 0.0112, 0, 0.66, 0, 469, 0, 1, 0, 0, 469, 0, 0 ], [ 1, 0, 0.0225, 0.0112, 0, 0.66, 0.1111, 40, 0, 2, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0337, 0.0112, 0, 0....
[ "from django.contrib.contenttypes.models import ContentType", "from django.db import DEFAULT_DB_ALIAS, router", "from django.db.models import get_apps, get_models, signals", "from django.utils.encoding import smart_text", "from django.utils import six", "from django.utils.six.moves import input", "def u...
""" models.py (even empty) currently required by the runtests.py to enable unit tests """
[ [ 8, 0, 1, 1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "\"\"\" models.py (even empty) currently required by the runtests.py to enable unit tests \"\"\"" ]
from django import forms class ManagementForm(forms.Form): """ ``ManagementForm`` is used to keep track of the current wizard step. """ current_step = forms.CharField(widget=forms.HiddenInput)
[ [ 1, 0, 0.1429, 0.1429, 0, 0.66, 0, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 3, 0, 0.7143, 0.7143, 0, 0.66, 1, 144, 0, 0, 0, 0, 953, 0, 1 ], [ 8, 1, 0.7143, 0.4286, 1, 0.88,...
[ "from django import forms", "class ManagementForm(forms.Form):\n \"\"\"\n ``ManagementForm`` is used to keep track of the current wizard step.\n \"\"\"\n current_step = forms.CharField(widget=forms.HiddenInput)", " \"\"\"\n ``ManagementForm`` is used to keep track of the current wizard step.\n...
from django.contrib.formtools.wizard import storage class SessionStorage(storage.BaseStorage): def __init__(self, *args, **kwargs): super(SessionStorage, self).__init__(*args, **kwargs) if self.prefix not in self.request.session: self.init_data() def _get_data(self): self...
[ [ 1, 0, 0.0526, 0.0526, 0, 0.66, 0, 691, 0, 1, 0, 0, 691, 0, 0 ], [ 3, 0, 0.6053, 0.8421, 0, 0.66, 1, 254, 0, 3, 0, 0, 466, 0, 4 ], [ 2, 1, 0.3947, 0.2105, 1, 0.86,...
[ "from django.contrib.formtools.wizard import storage", "class SessionStorage(storage.BaseStorage):\n\n def __init__(self, *args, **kwargs):\n super(SessionStorage, self).__init__(*args, **kwargs)\n if self.prefix not in self.request.session:\n self.init_data()\n\n def _get_data(self...
import json from django.core.exceptions import SuspiciousOperation from django.core.signing import BadSignature from django.contrib.formtools.wizard import storage class CookieStorage(storage.BaseStorage): encoder = json.JSONEncoder(separators=(',', ':')) def __init__(self, *args, **kwargs): super(...
[ [ 1, 0, 0.0303, 0.0303, 0, 0.66, 0, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.0909, 0.0303, 0, 0.66, 0.25, 160, 0, 1, 0, 0, 160, 0, 0 ], [ 1, 0, 0.1212, 0.0303, 0, 0....
[ "import json", "from django.core.exceptions import SuspiciousOperation", "from django.core.signing import BadSignature", "from django.contrib.formtools.wizard import storage", "class CookieStorage(storage.BaseStorage):\n encoder = json.JSONEncoder(separators=(',', ':'))\n\n def __init__(self, *args, *...
from django.core.exceptions import ImproperlyConfigured class MissingStorageModule(ImproperlyConfigured): pass class MissingStorageClass(ImproperlyConfigured): pass class NoFileStorageConfigured(ImproperlyConfigured): pass
[ [ 1, 0, 0.1, 0.1, 0, 0.66, 0, 160, 0, 1, 0, 0, 160, 0, 0 ], [ 3, 0, 0.35, 0.2, 0, 0.66, 0.3333, 810, 0, 0, 0, 0, 246, 0, 0 ], [ 3, 0, 0.65, 0.2, 0, 0.66, 0.6667...
[ "from django.core.exceptions import ImproperlyConfigured", "class MissingStorageModule(ImproperlyConfigured):\n pass", "class MissingStorageClass(ImproperlyConfigured):\n pass", "class NoFileStorageConfigured(ImproperlyConfigured):\n pass" ]
from django.core.files.uploadedfile import UploadedFile from django.utils.datastructures import MultiValueDict from django.utils.functional import lazy_property from django.utils import six from django.contrib.formtools.wizard.storage.exceptions import NoFileStorageConfigured class BaseStorage(object): step_key ...
[ [ 1, 0, 0.0092, 0.0092, 0, 0.66, 0, 779, 0, 1, 0, 0, 779, 0, 0 ], [ 1, 0, 0.0183, 0.0092, 0, 0.66, 0.2, 757, 0, 1, 0, 0, 757, 0, 0 ], [ 1, 0, 0.0275, 0.0092, 0, 0.6...
[ "from django.core.files.uploadedfile import UploadedFile", "from django.utils.datastructures import MultiValueDict", "from django.utils.functional import lazy_property", "from django.utils import six", "from django.contrib.formtools.wizard.storage.exceptions import NoFileStorageConfigured", "class BaseSto...
from django.utils.importlib import import_module from django.contrib.formtools.wizard.storage.base import BaseStorage from django.contrib.formtools.wizard.storage.exceptions import ( MissingStorageModule, MissingStorageClass, NoFileStorageConfigured) def get_storage(path, *args, **kwargs): i = path.rfind('.'...
[ [ 1, 0, 0.0455, 0.0455, 0, 0.66, 0, 118, 0, 1, 0, 0, 118, 0, 0 ], [ 1, 0, 0.1364, 0.0455, 0, 0.66, 0.3333, 52, 0, 1, 0, 0, 52, 0, 0 ], [ 1, 0, 0.2045, 0.0909, 0, 0....
[ "from django.utils.importlib import import_module", "from django.contrib.formtools.wizard.storage.base import BaseStorage", "from django.contrib.formtools.wizard.storage.exceptions import (\n MissingStorageModule, MissingStorageClass, NoFileStorageConfigured)", "def get_storage(path, *args, **kwargs):\n ...
import re from django import forms from django.shortcuts import redirect from django.core.urlresolvers import reverse from django.forms import formsets, ValidationError from django.views.generic import TemplateView from django.utils.datastructures import SortedDict from django.utils.decorators import classonlymethod f...
[ [ 1, 0, 0.0014, 0.0014, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0042, 0.0014, 0, 0.66, 0.0526, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.0057, 0.0014, 0, ...
[ "import re", "from django import forms", "from django.shortcuts import redirect", "from django.core.urlresolvers import reverse", "from django.forms import formsets, ValidationError", "from django.views.generic import TemplateView", "from django.utils.datastructures import SortedDict", "from django.ut...
from django.contrib.formtools.wizard.legacy import FormWizard
[ [ 1, 0, 1, 1, 0, 0.66, 0, 255, 0, 1, 0, 0, 255, 0, 0 ] ]
[ "from django.contrib.formtools.wizard.legacy import FormWizard" ]
""" FormWizard class -- implements a multi-page form, validating between each step and storing the form's state as HTML hidden fields so that no state is stored on the server side. """ from django.forms import HiddenInput from django.http import Http404 from django.shortcuts import render_to_response from django.templa...
[ [ 8, 0, 0.0111, 0.0185, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0222, 0.0037, 0, 0.66, 0.1, 666, 0, 1, 0, 0, 666, 0, 0 ], [ 1, 0, 0.0259, 0.0037, 0, 0.66, ...
[ "\"\"\"\nFormWizard class -- implements a multi-page form, validating between each\nstep and storing the form's state as HTML hidden fields so that no state is\nstored on the server side.\n\"\"\"", "from django.forms import HiddenInput", "from django.http import Http404", "from django.shortcuts import render_...
from django import forms from django.contrib.formtools.wizard import FormWizard from django.http import HttpResponse class Page1(forms.Form): name = forms.CharField(max_length=100) thirsty = forms.NullBooleanField() class Page2(forms.Form): address1 = forms.CharField(max_length=100) address2 = forms.C...
[ [ 1, 0, 0.0227, 0.0227, 0, 0.66, 0, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.0455, 0.0227, 0, 0.66, 0.0769, 691, 0, 1, 0, 0, 691, 0, 0 ], [ 1, 0, 0.0682, 0.0227, 0, ...
[ "from django import forms", "from django.contrib.formtools.wizard import FormWizard", "from django.http import HttpResponse", "class Page1(forms.Form):\n name = forms.CharField(max_length=100)\n thirsty = forms.NullBooleanField()", " name = forms.CharField(max_length=100)", " thirsty = forms.N...
from datetime import datetime from django.http import HttpRequest from django.conf import settings from django.utils.importlib import import_module from django.contrib.auth.models import User def get_request(): request = HttpRequest() engine = import_module(settings.SESSION_ENGINE) request.session = eng...
[ [ 1, 0, 0.0115, 0.0115, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0345, 0.0115, 0, 0.66, 0.1667, 779, 0, 1, 0, 0, 779, 0, 0 ], [ 1, 0, 0.046, 0.0115, 0, 0...
[ "from datetime import datetime", "from django.http import HttpRequest", "from django.conf import settings", "from django.utils.importlib import import_module", "from django.contrib.auth.models import User", "def get_request():\n request = HttpRequest()\n engine = import_module(settings.SESSION_ENGIN...
import os import tempfile from django import forms from django.contrib.auth.models import User from django.core.files.storage import FileSystemStorage from django.forms.formsets import formset_factory from django.forms.models import modelformset_factory from django.http import HttpResponse from django.template import ...
[ [ 1, 0, 0.0149, 0.0149, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0299, 0.0149, 0, 0.66, 0.0476, 516, 0, 1, 0, 0, 516, 0, 0 ], [ 1, 0, 0.0597, 0.0149, 0, ...
[ "import os", "import tempfile", "from django import forms", "from django.contrib.auth.models import User", "from django.core.files.storage import FileSystemStorage", "from django.forms.formsets import formset_factory", "from django.forms.models import modelformset_factory", "from django.http import Ht...
from __future__ import unicode_literals import os from django import forms from django.test import TestCase from django.test.client import RequestFactory from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.formto...
[ [ 1, 0, 0.0025, 0.0025, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0074, 0.0025, 0, 0.66, 0.0588, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0123, 0.0025, 0, ...
[ "from __future__ import unicode_literals", "import os", "from django import forms", "from django.test import TestCase", "from django.test.client import RequestFactory", "from django.conf import settings", "from django.contrib.auth.models import User", "from django.contrib.auth.tests.utils import skipI...
from django.conf.urls import patterns, url from django.contrib.formtools.tests.wizard.wizardtests.forms import ( SessionContactWizard, CookieContactWizard, Page1, Page2, Page3, Page4) urlpatterns = patterns('', url(r'^wiz_session/$', SessionContactWizard.as_view( [('form1', Page1), ('form2', P...
[ [ 1, 0, 0.0455, 0.0455, 0, 0.66, 0, 528, 0, 2, 0, 0, 528, 0, 0 ], [ 1, 0, 0.1136, 0.0909, 0, 0.66, 0.5, 545, 0, 6, 0, 0, 545, 0, 0 ], [ 14, 0, 0.6136, 0.8182, 0, 0....
[ "from django.conf.urls import patterns, url", "from django.contrib.formtools.tests.wizard.wizardtests.forms import (\n SessionContactWizard, CookieContactWizard, Page1, Page2, Page3, Page4)", "urlpatterns = patterns('',\n url(r'^wiz_session/$', SessionContactWizard.as_view(\n [('form1', Page1),\n ...
from __future__ import unicode_literals from django import forms, http from django.conf import settings from django.db import models from django.test import TestCase from django.template.response import TemplateResponse from django.utils.importlib import import_module from django.contrib.auth.models import User from...
[ [ 1, 0, 0.0045, 0.0045, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0135, 0.0045, 0, 0.66, 0.0476, 294, 0, 2, 0, 0, 294, 0, 0 ], [ 1, 0, 0.018, 0.0045, 0, 0...
[ "from __future__ import unicode_literals", "from django import forms, http", "from django.conf import settings", "from django.db import models", "from django.test import TestCase", "from django.template.response import TemplateResponse", "from django.utils.importlib import import_module", "from django...
import json from django.test import TestCase from django.core import signing from django.core.exceptions import SuspiciousOperation from django.http import HttpResponse from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.formtools.wizard.storage.cookie import CookieStorage from django.con...
[ [ 1, 0, 0.0204, 0.0204, 0, 0.66, 0, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.0612, 0.0204, 0, 0.66, 0.125, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 1, 0, 0.0816, 0.0204, 0, 0...
[ "import json", "from django.test import TestCase", "from django.core import signing", "from django.core.exceptions import SuspiciousOperation", "from django.http import HttpResponse", "from django.contrib.auth.tests.utils import skipIfCustomUser", "from django.contrib.formtools.wizard.storage.cookie imp...
from django.test import TestCase from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.formtools.tests.wizard.storage import TestStorage from django.contrib.formtools.wizard.storage.session import SessionStorage @skipIfCustomUser class TestSessionStorage(TestStorage, TestCase): def get...
[ [ 1, 0, 0.0909, 0.0909, 0, 0.66, 0, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 1, 0, 0.2727, 0.0909, 0, 0.66, 0.25, 792, 0, 1, 0, 0, 792, 0, 0 ], [ 1, 0, 0.3636, 0.0909, 0, 0....
[ "from django.test import TestCase", "from django.contrib.auth.tests.utils import skipIfCustomUser", "from django.contrib.formtools.tests.wizard.storage import TestStorage", "from django.contrib.formtools.wizard.storage.session import SessionStorage", "class TestSessionStorage(TestStorage, TestCase):\n de...
import os import tempfile from django import forms from django.core.files.storage import FileSystemStorage from django.forms.formsets import formset_factory from django.http import HttpResponse from django.template import Template, Context from django.contrib.auth.models import User from django.contrib.formtools.wiz...
[ [ 1, 0, 0.0192, 0.0192, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0385, 0.0192, 0, 0.66, 0.0588, 516, 0, 1, 0, 0, 516, 0, 0 ], [ 1, 0, 0.0769, 0.0192, 0, ...
[ "import os", "import tempfile", "from django import forms", "from django.core.files.storage import FileSystemStorage", "from django.forms.formsets import formset_factory", "from django.http import HttpResponse", "from django.template import Template, Context", "from django.contrib.auth.models import U...
from __future__ import unicode_literals from django.core.urlresolvers import reverse from django.http import QueryDict from django.test import TestCase from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.formtools.wizard.views import (NamedUrlS...
[ [ 1, 0, 0.0026, 0.0026, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0079, 0.0026, 0, 0.66, 0.0667, 749, 0, 1, 0, 0, 749, 0, 0 ], [ 1, 0, 0.0105, 0.0026, 0, ...
[ "from __future__ import unicode_literals", "from django.core.urlresolvers import reverse", "from django.http import QueryDict", "from django.test import TestCase", "from django.contrib.auth.models import User", "from django.contrib.auth.tests.utils import skipIfCustomUser", "from django.contrib.formtool...
from django.conf.urls import patterns, url from django.contrib.formtools.tests.wizard.namedwizardtests.forms import ( SessionContactWizard, CookieContactWizard, Page1, Page2, Page3, Page4) def get_named_session_wizard(): return SessionContactWizard.as_view( [('form1', Page1), ('form2', Page2), ('form3'...
[ [ 1, 0, 0.0417, 0.0417, 0, 0.66, 0, 528, 0, 2, 0, 0, 528, 0, 0 ], [ 1, 0, 0.1042, 0.0833, 0, 0.66, 0.25, 903, 0, 6, 0, 0, 903, 0, 0 ], [ 2, 0, 0.3125, 0.25, 0, 0.66...
[ "from django.conf.urls import patterns, url", "from django.contrib.formtools.tests.wizard.namedwizardtests.forms import (\n SessionContactWizard, CookieContactWizard, Page1, Page2, Page3, Page4)", "def get_named_session_wizard():\n return SessionContactWizard.as_view(\n [('form1', Page1), ('form2',...
from django.test import TestCase from django.contrib.formtools.wizard.storage import (get_storage, MissingStorageModule, MissingStorageClass) from django.contrib.formtools.wizard.storage.base import BaseStorage ...
[ [ 1, 0, 0.0455, 0.0455, 0, 0.66, 0, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 1, 0, 0.1818, 0.1364, 0, 0.66, 0.3333, 358, 0, 3, 0, 0, 358, 0, 0 ], [ 1, 0, 0.2727, 0.0455, 0, ...
[ "from django.test import TestCase", "from django.contrib.formtools.wizard.storage import (get_storage,\n MissingStorageModule,\n MissingStorageClass)", "from django.contrib.formtools.wizard.storage.base impor...
from django.contrib.formtools.tests.wizard.cookiestorage import TestCookieStorage from django.contrib.formtools.tests.wizard.forms import FormTests, SessionFormTests, CookieFormTests from django.contrib.formtools.tests.wizard.loadstorage import TestLoadStorage from django.contrib.formtools.tests.wizard.namedwizardtests...
[ [ 1, 0, 0.0526, 0.0526, 0, 0.66, 0, 832, 0, 1, 0, 0, 832, 0, 0 ], [ 1, 0, 0.1053, 0.0526, 0, 0.66, 0.2, 294, 0, 3, 0, 0, 294, 0, 0 ], [ 1, 0, 0.1579, 0.0526, 0, 0.6...
[ "from django.contrib.formtools.tests.wizard.cookiestorage import TestCookieStorage", "from django.contrib.formtools.tests.wizard.forms import FormTests, SessionFormTests, CookieFormTests", "from django.contrib.formtools.tests.wizard.loadstorage import TestLoadStorage", "from django.contrib.formtools.tests.wiz...
""" This is a URLconf to be loaded by tests.py. Add any URLs needed for tests only. """ from __future__ import absolute_import from django.conf.urls import patterns, url from django.contrib.formtools.tests import TestFormPreview, TestWizardClass from django.contrib.formtools.tests.forms import (ContactWizard, Page1,...
[ [ 8, 0, 0.1053, 0.1579, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2632, 0.0526, 0, 0.66, 0.2, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.3684, 0.0526, 0, 0.66, ...
[ "\"\"\"\nThis is a URLconf to be loaded by tests.py. Add any URLs needed for tests only.\n\"\"\"", "from __future__ import absolute_import", "from django.conf.urls import patterns, url", "from django.contrib.formtools.tests import TestFormPreview, TestWizardClass", "from django.contrib.formtools.tests.forms...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import os import pickle import re import warnings from django import http from django.conf import settings from django.contrib.formtools import preview, utils from django.contrib.formtools.wizard import FormWizard from django.test import ...
[ [ 1, 0, 0.0045, 0.0023, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0091, 0.0023, 0, 0.66, 0.0417, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0113, 0.0023, 0, ...
[ "from __future__ import unicode_literals", "import datetime", "import os", "import pickle", "import re", "import warnings", "from django import http", "from django.conf import settings", "from django.contrib.formtools import preview, utils", "from django.contrib.formtools.wizard import FormWizard"...
""" Formtools Preview application. """ from django.http import Http404 from django.shortcuts import render_to_response from django.template.context import RequestContext from django.utils.crypto import constant_time_compare from django.contrib.formtools.utils import form_hmac AUTO_ID = 'formtools_%s' # Each form here...
[ [ 8, 0, 0.0135, 0.0203, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0338, 0.0068, 0, 0.66, 0.1429, 779, 0, 1, 0, 0, 779, 0, 0 ], [ 1, 0, 0.0405, 0.0068, 0, 0.66...
[ "\"\"\"\nFormtools Preview application.\n\"\"\"", "from django.http import Http404", "from django.shortcuts import render_to_response", "from django.template.context import RequestContext", "from django.utils.crypto import constant_time_compare", "from django.contrib.formtools.utils import form_hmac", "...
from __future__ import unicode_literals # Do not try cPickle here (see #18340) import pickle from django.utils.crypto import salted_hmac from django.utils import six def form_hmac(form): """ Calculates a security hash for the given Form instance. """ data = [] for bf in form: # Get the v...
[ [ 1, 0, 0.0357, 0.0357, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1429, 0.0357, 0, 0.66, 0.25, 848, 0, 1, 0, 0, 848, 0, 0 ], [ 1, 0, 0.2143, 0.0357, 0, 0....
[ "from __future__ import unicode_literals", "import pickle", "from django.utils.crypto import salted_hmac", "from django.utils import six", "def form_hmac(form):\n \"\"\"\n Calculates a security hash for the given Form instance.\n \"\"\"\n data = []\n for bf in form:\n # Get the value f...
from django.utils.http import http_date, parse_http_date_safe class ConditionalGetMiddleware(object): """ Handles conditional GET operations. If the response has a ETag or Last-Modified header, and the request has If-None-Match or If-Modified-Since, the response is replaced by an HttpNotModified. ...
[ [ 1, 0, 0.0286, 0.0286, 0, 0.66, 0, 516, 0, 2, 0, 0, 516, 0, 0 ], [ 3, 0, 0.5429, 0.9429, 0, 0.66, 1, 362, 0, 1, 0, 0, 186, 0, 10 ], [ 8, 1, 0.2, 0.2, 1, 0.82, ...
[ "from django.utils.http import http_date, parse_http_date_safe", "class ConditionalGetMiddleware(object):\n \"\"\"\n Handles conditional GET operations. If the response has a ETag or\n Last-Modified header, and the request has If-None-Match or\n If-Modified-Since, the response is replaced by an HttpNo...
"This is the locale selecting middleware that will look at accept headers" from django.conf import settings from django.core.urlresolvers import (is_valid_path, get_resolver, LocaleRegexURLResolver) from django.http import HttpResponseRedirect from django.utils.cache import patch_...
[ [ 8, 0, 0.0169, 0.0169, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0508, 0.0169, 0, 0.66, 0.1667, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0763, 0.0339, 0, 0.66...
[ "\"This is the locale selecting middleware that will look at accept headers\"", "from django.conf import settings", "from django.core.urlresolvers import (is_valid_path, get_resolver,\n LocaleRegexURLResolver)", "from django.http import HttpResponseRedirect", "from djang...