Permalink
Browse files

[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
  • Loading branch information...
1 parent d5104b6 commit c3cc2198e717e84866b884f2f4370d78a9eb2b1a @jbronn jbronn committed Dec 22, 2009
Showing with 3 additions and 3 deletions.
  1. +2 −2 django/contrib/gis/sitemaps/views.py
  2. +1 −1 django/contrib/gis/utils/layermapping.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.
"""
@@ -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

0 comments on commit c3cc219

Please sign in to comment.