Author: jbronn
Date: 2009-12-22 00:26:41 -0600 (Tue, 22 Dec 2009)
New Revision: 11940

Modified:
   django/branches/soc2009/multidb/django/contrib/gis/sitemaps/views.py
   django/branches/soc2009/multidb/django/contrib/gis/utils/layermapping.py
Log:
[soc2009/multidb] `LayerMapping` and geographic sitemap views weren't using 
`DEFAULT_DB_ALIAS` as the default for `using` kwarg.


Modified: django/branches/soc2009/multidb/django/contrib/gis/sitemaps/views.py
===================================================================
--- django/branches/soc2009/multidb/django/contrib/gis/sitemaps/views.py        
2009-12-22 06:08:15 UTC (rev 11939)
+++ django/branches/soc2009/multidb/django/contrib/gis/sitemaps/views.py        
2009-12-22 06:26:41 UTC (rev 11940)
@@ -59,7 +59,7 @@
     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 @@
         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.
     """

Modified: 
django/branches/soc2009/multidb/django/contrib/gis/utils/layermapping.py
===================================================================
--- django/branches/soc2009/multidb/django/contrib/gis/utils/layermapping.py    
2009-12-22 06:08:15 UTC (rev 11939)
+++ django/branches/soc2009/multidb/django/contrib/gis/utils/layermapping.py    
2009-12-22 06:26:41 UTC (rev 11940)
@@ -67,7 +67,7 @@
     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

--

You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.


Reply via email to