diff options
| author | Claude Paroz <claude@2xlibre.net> | 2015-01-17 12:41:18 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2015-01-17 12:41:18 +0100 |
| commit | 428c884083d8e60025ba1d2fa97de438c57c9d48 (patch) | |
| tree | ffe80fab319bb8255807064866b4c22d4262bcdb | |
| parent | 53e1423eda369acb1882d6939a7f9e11617e5591 (diff) | |
Used features in GIS sitemap view conditionals
| -rw-r--r-- | django/contrib/gis/sitemaps/views.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/django/contrib/gis/sitemaps/views.py b/django/contrib/gis/sitemaps/views.py index d12ed53298..a84621374b 100644 --- a/django/contrib/gis/sitemaps/views.py +++ b/django/contrib/gis/sitemaps/views.py @@ -31,14 +31,14 @@ def kml(request, label, model, field_name=None, compress=False, using=DEFAULT_DB connection = connections[using] - if connection.ops.postgis: - # PostGIS will take care of transformation. + if connection.features.has_kml_method: + # Database will take care of transformation. placemarks = klass._default_manager.using(using).kml(field_name=field_name) else: - # There's no KML method on Oracle or MySQL, so we use the `kml` + # If the database offers no KML method, we use the `kml` # attribute of the lazy geometry instead. placemarks = [] - if connection.ops.oracle: + if connection.features.has_transform_method: qs = klass._default_manager.using(using).transform(4326, field_name=field_name) else: qs = klass._default_manager.using(using).all() |
