1
0
mirror of https://github.com/django/django.git synced 2025-07-04 09:49:12 +00:00

[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
This commit is contained in:
Justin Bronn 2009-12-22 06:26:41 +00:00
parent d5104b63a3
commit c3cc2198e7
2 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ def sitemap(request, sitemaps, section=None):
xml = smart_str(loader.render_to_string('gis/sitemaps/geo_sitemap.xml', {'urlset': urls})) xml = smart_str(loader.render_to_string('gis/sitemaps/geo_sitemap.xml', {'urlset': urls}))
return HttpResponse(xml, mimetype='application/xml') 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. 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 render = render_to_kml
return render('gis/kml/placemarks.kml', {'places' : placemarks}) 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. This view returns KMZ for the given app label, model, and field name.
""" """

View File

@ -67,7 +67,7 @@ class LayerMapping(object):
def __init__(self, model, data, mapping, layer=0, def __init__(self, model, data, mapping, layer=0,
source_srs=None, encoding=None, source_srs=None, encoding=None,
transaction_mode='commit_on_success', 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 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 a DataSource (or string path to an OGR-supported data file), and a mapping