#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 , 12 years ago
| Triage Stage: | Unreviewed → Ready for checkin |
|---|
comment:2 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
In 27c1a7257652031d3957c97271723778f27c4d7b: