summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bronn <jbronn@gmail.com>2009-12-22 06:26:41 +0000
committerJustin Bronn <jbronn@gmail.com>2009-12-22 06:26:41 +0000
commitc3cc2198e717e84866b884f2f4370d78a9eb2b1a (patch)
tree2dcce41fa6b061ac2fef73de35a1bbc5f7fba95c
parentd5104b63a3f17f4739325dc13b29ce1e6a013ef1 (diff)
downloaddjango-c3cc2198e717e84866b884f2f4370d78a9eb2b1a.tar.gz
[soc2009/multidb] `LayerMapping` and geographic sitemap views weren't using `DEFAULT_DB_ALIAS` as the default for `using` kwarg.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11940 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/gis/sitemaps/views.py4
-rw-r--r--django/contrib/gis/utils/layermapping.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/django/contrib/gis/sitemaps/views.py b/django/contrib/gis/sitemaps/views.py
index 1c8ac5c1bc..f3c1da24ed 100644
--- a/django/contrib/gis/sitemaps/views.py
+++ b/django/contrib/gis/sitemaps/views.py
@@ -59,7 +59,7 @@ def sitemap(request, sitemaps, section=None):
xml = smart_str(loader.render_to_string('gis/sitemaps/geo_sitemap.xml', {'urlset': urls}))
return HttpResponse(xml, mimetype='application/xml')
-def kml(request, label, model, field_name=None, compress=False, using=None):
+def kml(request, label, model, field_name=None, compress=False, using=DEFAULT_DB_ALIAS):
"""
This view generates KML for the given app label, model, and field name.
@@ -103,7 +103,7 @@ def kml(request, label, model, field_name=None, compress=False, using=None):
render = render_to_kml
return render('gis/kml/placemarks.kml', {'places' : placemarks})
-def kmz(request, label, model, field_name=None, using=None):
+def kmz(request, label, model, field_name=None, using=DEFAULT_DB_ALIAS):
"""
This view returns KMZ for the given app label, model, and field name.
"""
diff --git a/django/contrib/gis/utils/layermapping.py b/django/contrib/gis/utils/layermapping.py
index 41de5b49c9..9db743aea4 100644
--- a/django/contrib/gis/utils/layermapping.py
+++ b/django/contrib/gis/utils/layermapping.py
@@ -67,7 +67,7 @@ class LayerMapping(object):
def __init__(self, model, data, mapping, layer=0,
source_srs=None, encoding=None,
transaction_mode='commit_on_success',
- transform=True, unique=None, using=None):
+ transform=True, unique=None, using=DEFAULT_DB_ALIAS):
"""
A LayerMapping object is initialized using the given Model (not an instance),
a DataSource (or string path to an OGR-supported data file), and a mapping