Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#20773 closed Bug (fixed)

contrib/gis/maps/google/gmap : script() string formating

Reported by: martync Owned by: nobody
Component: GIS Version: 1.5
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The property named "script" in contrib.gis.maps.google.gmap.GoogleMap has a wrong string formating.
https://github.com/django/django/blob/1.5c2/django/contrib/gis/maps/google/gmap.py#L134-L137

        return format_html('%s\n  <script type="text/javascript">\n//<![CDATA[\n%s//]]>\n  </script>', self.api_script, mark_safe(self.js))

while it should be :

        return format_html('{0}\n  <script type="text/javascript">\n//<![CDATA[\n{1}//]]>\n  </script>', self.api_script, mark_safe(self.js))

I have created a pull request for this bug : https://github.com/django/django/pull/1379
I will write a testcase.

Change History (4)

comment:1 by Marc Tamlyn, 11 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Claude Paroz <claude@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 27c1a7257652031d3957c97271723778f27c4d7b:

Fixed #20773 -- [gis] Fixed regression in GoogleMap output

Thanks Martyn Clement for the report and the initial patch.

comment:3 by Claude Paroz <claude@…>, 11 years ago

In 92f66a613498172e6300c8a0b57513183e998597:

[1.6.x] Fixed #20773 -- [gis] Fixed regression in GoogleMap output

Thanks Martyn Clement for the report and the initial patch.
Backport of 27c1a7257 from master.

comment:4 by Claude Paroz <claude@…>, 11 years ago

In 01910115329c2073e6c68b214155dd5fb87132c8:

[1.5.x] Fixed #20773 -- [gis] Fixed regression in GoogleMap output

Thanks Martyn Clement for the report and the initial patch.
Backport of 27c1a7257 from master.

Note: See TracTickets for help on using tickets.
Back to Top