Skip to content

Commit

Permalink
[soc2009/multidb] LayerMapping and geographic sitemap views weren't…
Browse files Browse the repository at this point in the history
… 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
jbronn committed Dec 22, 2009
1 parent d5104b6 commit c3cc219
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions django/contrib/gis/sitemaps/views.py
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
"""
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/gis/utils/layermapping.py
Expand Up @@ -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
Expand Down

0 comments on commit c3cc219

Please sign in to comment.