diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-10-12 14:58:57 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-10-12 14:58:57 +0200 |
commit | 7e6d853d67087fcac51542da8a3ae4b1aa207f13 (patch) | |
tree | ebe5e8ad74bb3d88dc2d437c431a1a4462248924 /chimere/widgets.py | |
parent | e8743c29ee686d9629d7ce47235c711398b935ab (diff) | |
download | Chimère-7e6d853d67087fcac51542da8a3ae4b1aa207f13.tar.bz2 Chimère-7e6d853d67087fcac51542da8a3ae4b1aa207f13.zip |
JS: fix GPX upload
Diffstat (limited to 'chimere/widgets.py')
-rw-r--r-- | chimere/widgets.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chimere/widgets.py b/chimere/widgets.py index 23709ac..e107237 100644 --- a/chimere/widgets.py +++ b/chimere/widgets.py @@ -22,10 +22,11 @@ Extra widgets and fields """ from django import conf from django import forms -from django.core.exceptions import ObjectDoesNotExist from django.conf import settings from django.contrib.gis.db import models from django.contrib.gis.geos import fromstr +from django.core.exceptions import ObjectDoesNotExist +from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ @@ -252,6 +253,7 @@ class RouteChooserWidget(forms.TextInput): tpl = getMapJS(area_name) map_layers, default_area = get_map_layers(area_name) js = """ + var extra_url = "%s"; OpenLayers.ImgPath = '%schimere/img/'; var EPSG_DISPLAY_PROJECTION = epsg_display_projection = new OpenLayers.Projection('EPSG:%s'); var EPSG_PROJECTION = epsg_projection = new OpenLayers.Projection('EPSG:%s'); @@ -263,7 +265,8 @@ class RouteChooserWidget(forms.TextInput): chimere_init_options['edition'] = true; chimere_init_options['edition_type_is_route'] = true; chimere_init_options["checked_categories"] = []; - """ % (settings.STATIC_URL, settings.CHIMERE_EPSG_DISPLAY_PROJECTION, + """ % ( reverse("chimere:index"), settings.STATIC_URL, + settings.CHIMERE_EPSG_DISPLAY_PROJECTION, settings.CHIMERE_EPSG_PROJECTION, settings.CHIMERE_DEFAULT_CENTER, settings.CHIMERE_DEFAULT_ZOOM, ", ".join(map_layers)) if default_area: |