> geodjango_mpoly.get_ewkt = function(feat){return 'SRID=900 913;' +
geodjango_mpoly.wkt_f.write(feat);}
the following change in contrib/gis/templates/gis/admin/openlayers.js
fixed the problem
{{{
- {{ module }}.get_ewkt = function(feat){return 'SRID={{ srid }};' + {{
module }}.wkt_f.write(feat);}
+ {{ module }}.get_ewkt = function(feat){return 'SRID={% localize off %}{{
srid }}{% endlocalize %};' + {{ module }}.wkt_f.write(feat);}
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20415>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Even simpler: `{{ srid|unlocalize }}`
--
Ticket URL: <https://code.djangoproject.com/ticket/20415#comment:1>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"0a29057ebea4335d503e373e4526b1c62c15bcdc"]:
{{{
#!CommitTicketReference repository=""
revision="0a29057ebea4335d503e373e4526b1c62c15bcdc"
Fixed #20415 -- Ensured srid is not localized in openlayers template
Thanks pierremarc07 at gmail.com for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20415#comment:2>
* status: closed => new
* version: 1.5 => 1.8
* resolution: fixed =>
Comment:
Hi,
I get this bug again (tested in 1.8.5 and 1.8.8).
As soon as I add {{{USE_THOUSAND_SEPARATOR = True}}} in settings.py, the
default map widgets in the admin stop working, as I get this javascript
error :
{{{
`Uncaught SyntaxError: Unexpected token ,` `(index):151`
}}}
The javascript indeed looks like :
{{{
var options = {
...
map_srid: 4,326,
...
};
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20415#comment:3>
* owner: nobody => timgraham
* status: new => assigned
* has_patch: 1 => 0
* type: Uncategorized => Bug
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/20415#comment:4>
* has_patch: 0 => 1
Comment:
Could you check that [https://github.com/django/django/pull/6052 this
patch] fixes the issue?
--
Ticket URL: <https://code.djangoproject.com/ticket/20415#comment:5>
Comment (by olivierdalang):
Hi, yes this seems to fix it ! Many thanks !
Question : will the fix be backported to 1.8 ?
--
Ticket URL: <https://code.djangoproject.com/ticket/20415#comment:6>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/20415#comment:7>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"19d1cb14519186902d7e27813bf2643fe3f7cfa3" 19d1cb14]:
{{{
#!CommitTicketReference repository=""
revision="19d1cb14519186902d7e27813bf2643fe3f7cfa3"
Fixed #20415 -- Ensured srid isn't localized in OpenLayers JavaScript.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20415#comment:8>
Comment (by Tim Graham <timograham@…>):
In [changeset:"efd855481581b5758d866a009bbd1074e74869b4" efd8554]:
{{{
#!CommitTicketReference repository=""
revision="efd855481581b5758d866a009bbd1074e74869b4"
[1.9.x] Fixed #20415 -- Ensured srid isn't localized in OpenLayers
JavaScript.
Backport of 19d1cb14519186902d7e27813bf2643fe3f7cfa3 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20415#comment:9>
Comment (by Tim Graham <timograham@…>):
In [changeset:"229666289d3aafbb4668820a7ecf243dd4a7fc72" 2296662]:
{{{
#!CommitTicketReference repository=""
revision="229666289d3aafbb4668820a7ecf243dd4a7fc72"
[1.8.x] Fixed #20415 -- Ensured srid isn't localized in OpenLayers
JavaScript.
Backport of 19d1cb14519186902d7e27813bf2643fe3f7cfa3 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20415#comment:10>