Loading django/contrib/gis/maps/google/gmap.py +2 −0 Original line number Diff line number Diff line from __future__ import unicode_literals from django.conf import settings from django.template.loader import render_to_string from django.utils.html import format_html Loading django/contrib/gis/maps/google/overlays.py +2 −0 Original line number Diff line number Diff line from __future__ import unicode_literals from django.contrib.gis.geos import fromstr, Point, LineString, LinearRing, Polygon from django.utils.functional import total_ordering from django.utils.safestring import mark_safe Loading django/contrib/gis/maps/google/zoom.py +2 −0 Original line number Diff line number Diff line from __future__ import unicode_literals from django.contrib.gis.geos import GEOSGeometry, LinearRing, Polygon, Point from django.contrib.gis.maps.google.gmap import GoogleMapException from django.utils.six.moves import xrange Loading django/contrib/gis/tests/maps/__init__.py 0 → 100644 +0 −0 Empty file added. django/contrib/gis/tests/maps/tests.py 0 → 100644 +27 −0 Original line number Diff line number Diff line # -*- coding: utf-8 -*- from __future__ import unicode_literals from unittest import skipUnless from django.contrib.gis.geos import HAS_GEOS, Point from django.test import TestCase from django.test.utils import override_settings GOOGLE_MAPS_API_KEY = 'XXXX' @skipUnless(HAS_GEOS, 'Geos is required.') class GoogleMapsTest(TestCase): @override_settings(GOOGLE_MAPS_API_KEY=GOOGLE_MAPS_API_KEY) def test_unicode_in_google_maps(self): """ Test that GoogleMap doesn't crash with non-ascii content. """ from django.contrib.gis.maps.google.gmap import GoogleMap, GMarker center = Point(6.146805, 46.227574) marker = GMarker(center, title='En français !') google_map = GoogleMap(center=center, zoom=18, markers=[marker]) self.assertIn("En français", google_map.scripts) Loading
django/contrib/gis/maps/google/gmap.py +2 −0 Original line number Diff line number Diff line from __future__ import unicode_literals from django.conf import settings from django.template.loader import render_to_string from django.utils.html import format_html Loading
django/contrib/gis/maps/google/overlays.py +2 −0 Original line number Diff line number Diff line from __future__ import unicode_literals from django.contrib.gis.geos import fromstr, Point, LineString, LinearRing, Polygon from django.utils.functional import total_ordering from django.utils.safestring import mark_safe Loading
django/contrib/gis/maps/google/zoom.py +2 −0 Original line number Diff line number Diff line from __future__ import unicode_literals from django.contrib.gis.geos import GEOSGeometry, LinearRing, Polygon, Point from django.contrib.gis.maps.google.gmap import GoogleMapException from django.utils.six.moves import xrange Loading
django/contrib/gis/tests/maps/tests.py 0 → 100644 +27 −0 Original line number Diff line number Diff line # -*- coding: utf-8 -*- from __future__ import unicode_literals from unittest import skipUnless from django.contrib.gis.geos import HAS_GEOS, Point from django.test import TestCase from django.test.utils import override_settings GOOGLE_MAPS_API_KEY = 'XXXX' @skipUnless(HAS_GEOS, 'Geos is required.') class GoogleMapsTest(TestCase): @override_settings(GOOGLE_MAPS_API_KEY=GOOGLE_MAPS_API_KEY) def test_unicode_in_google_maps(self): """ Test that GoogleMap doesn't crash with non-ascii content. """ from django.contrib.gis.maps.google.gmap import GoogleMap, GMarker center = Point(6.146805, 46.227574) marker = GMarker(center, title='En français !') google_map = GoogleMap(center=center, zoom=18, markers=[marker]) self.assertIn("En français", google_map.scripts)