Loading django/contrib/admin/views/main.py +4 −2 Original line number Diff line number Diff line Loading @@ -198,8 +198,10 @@ class ChangeList(six.with_metaclass(RenameChangeListMethods)): six.reraise(IncorrectLookupParameters, IncorrectLookupParameters(e), sys.exc_info()[2]) def get_query_string(self, new_params=None, remove=None): if new_params is None: new_params = {} if remove is None: remove = [] if new_params is None: new_params = {} if remove is None: remove = [] p = self.params.copy() for r in remove: for k in list(p): Loading django/contrib/admindocs/utils.py +8 −4 Original line number Diff line number Diff line Loading @@ -94,15 +94,19 @@ ROLES = { def create_reference_role(rolename, urlbase): def _role(name, rawtext, text, lineno, inliner, options=None, content=None): if options is None: options = {} if content is None: content = [] if options is None: options = {} if content is None: content = [] node = docutils.nodes.reference(rawtext, text, refuri=(urlbase % (inliner.document.settings.link_base, text.lower())), **options) return [node], [] docutils.parsers.rst.roles.register_canonical_role(rolename, _role) def default_reference_role(name, rawtext, text, lineno, inliner, options=None, content=None): if options is None: options = {} if content is None: content = [] if options is None: options = {} if content is None: content = [] context = inliner.document.settings.default_reference_context node = docutils.nodes.reference(rawtext, text, refuri=(ROLES[context] % (inliner.document.settings.link_base, text.lower())), **options) return [node], [] Loading django/contrib/gis/admin/options.py +4 −2 Original line number Diff line number Diff line Loading @@ -70,8 +70,10 @@ class GeoModelAdmin(ModelAdmin): """ is_collection = db_field.geom_type in ('MULTIPOINT', 'MULTILINESTRING', 'MULTIPOLYGON', 'GEOMETRYCOLLECTION') if is_collection: if db_field.geom_type == 'GEOMETRYCOLLECTION': collection_type = 'Any' else: collection_type = OGRGeomType(db_field.geom_type.replace('MULTI', '')) if db_field.geom_type == 'GEOMETRYCOLLECTION': collection_type = 'Any' else: collection_type = OGRGeomType(db_field.geom_type.replace('MULTI', '')) else: collection_type = 'None' Loading django/contrib/gis/admin/widgets.py +2 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,8 @@ class OpenLayersWidget(Textarea): """ def render(self, name, value, attrs=None): # Update the template parameters with any attributes passed in. if attrs: self.params.update(attrs) if attrs: self.params.update(attrs) # Defaulting the WKT value to a blank string -- this # will be tested in the JavaScript and the appropriate Loading django/contrib/gis/db/backends/base.py +4 −2 Original line number Diff line number Diff line Loading @@ -201,8 +201,10 @@ class SpatialRefSysMixin(object): return self.srs.ellipsoid else: m = self.spheroid_regex.match(self.wkt) if m: return (float(m.group('major')), float(m.group('flattening'))) else: return None if m: return (float(m.group('major')), float(m.group('flattening'))) else: return None @property def name(self): Loading Loading
django/contrib/admin/views/main.py +4 −2 Original line number Diff line number Diff line Loading @@ -198,8 +198,10 @@ class ChangeList(six.with_metaclass(RenameChangeListMethods)): six.reraise(IncorrectLookupParameters, IncorrectLookupParameters(e), sys.exc_info()[2]) def get_query_string(self, new_params=None, remove=None): if new_params is None: new_params = {} if remove is None: remove = [] if new_params is None: new_params = {} if remove is None: remove = [] p = self.params.copy() for r in remove: for k in list(p): Loading
django/contrib/admindocs/utils.py +8 −4 Original line number Diff line number Diff line Loading @@ -94,15 +94,19 @@ ROLES = { def create_reference_role(rolename, urlbase): def _role(name, rawtext, text, lineno, inliner, options=None, content=None): if options is None: options = {} if content is None: content = [] if options is None: options = {} if content is None: content = [] node = docutils.nodes.reference(rawtext, text, refuri=(urlbase % (inliner.document.settings.link_base, text.lower())), **options) return [node], [] docutils.parsers.rst.roles.register_canonical_role(rolename, _role) def default_reference_role(name, rawtext, text, lineno, inliner, options=None, content=None): if options is None: options = {} if content is None: content = [] if options is None: options = {} if content is None: content = [] context = inliner.document.settings.default_reference_context node = docutils.nodes.reference(rawtext, text, refuri=(ROLES[context] % (inliner.document.settings.link_base, text.lower())), **options) return [node], [] Loading
django/contrib/gis/admin/options.py +4 −2 Original line number Diff line number Diff line Loading @@ -70,8 +70,10 @@ class GeoModelAdmin(ModelAdmin): """ is_collection = db_field.geom_type in ('MULTIPOINT', 'MULTILINESTRING', 'MULTIPOLYGON', 'GEOMETRYCOLLECTION') if is_collection: if db_field.geom_type == 'GEOMETRYCOLLECTION': collection_type = 'Any' else: collection_type = OGRGeomType(db_field.geom_type.replace('MULTI', '')) if db_field.geom_type == 'GEOMETRYCOLLECTION': collection_type = 'Any' else: collection_type = OGRGeomType(db_field.geom_type.replace('MULTI', '')) else: collection_type = 'None' Loading
django/contrib/gis/admin/widgets.py +2 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,8 @@ class OpenLayersWidget(Textarea): """ def render(self, name, value, attrs=None): # Update the template parameters with any attributes passed in. if attrs: self.params.update(attrs) if attrs: self.params.update(attrs) # Defaulting the WKT value to a blank string -- this # will be tested in the JavaScript and the appropriate Loading
django/contrib/gis/db/backends/base.py +4 −2 Original line number Diff line number Diff line Loading @@ -201,8 +201,10 @@ class SpatialRefSysMixin(object): return self.srs.ellipsoid else: m = self.spheroid_regex.match(self.wkt) if m: return (float(m.group('major')), float(m.group('flattening'))) else: return None if m: return (float(m.group('major')), float(m.group('flattening'))) else: return None @property def name(self): Loading