Working with the example in contrib/gis/maps/google/init.py.
HTML does not render correctly, for example:
<script>
renders as:
<script>
Using mark_safe in the view:
from django.utils.safestring import mark_safe
from django.contrib.gis.maps.google import *
from django.contrib.gis.shortcuts import *
def test(request):
return mark_safe(render_to_response('base.html', {'google' : GoogleMap(key="blah")}))
produces a traceback:
Traceback (most recent call last):
File "/opt/local/lib/python2.5/site-packages/django/core/servers/basehttp.py", line 277, in run
self.result = application(self.environ, self.start_response)
File "/opt/local/lib/python2.5/site-packages/django/core/servers/basehttp.py", line 631, in __call__
return self.application(environ, start_response)
File "/opt/local/lib/python2.5/site-packages/django/core/handlers/wsgi.py", line 209, in __call__
response = middleware_method(request, response)
File "/opt/local/lib/python2.5/site-packages/django/middleware/common.py", line 90, in process_response
if response.status_code == 404:
AttributeError: 'SafeString' object has no attribute 'status_code'