Beispiel #1
0
from mapentity import registry

from geotrek.altimetry.views import (ElevationProfile, ElevationChart,
                                     ElevationArea)
from . import models
from .views import (
    TrekDocumentPublic, TrekPrint,
    TrekJsonDetail, TrekGPXDetail, TrekKMLDetail, TrekPOIGeoJSON,
    TrekInformationDeskGeoJSON, WebLinkCreatePopup
)


urlpatterns = patterns('',
    url(r'^document/print-trek-(?P<pk>\d+).odt$', TrekDocumentPublic.as_view(), name="trek_document_public"),
    url(r'^api/trek/trek-(?P<pk>\d+).pdf$', TrekPrint.as_view(), name="trek_printable"),

    url(r'^api/trek/trek-(?P<pk>\d+).json$', TrekJsonDetail.as_view(), name="trek_json_detail"),
    url(r'^api/trek/trek-(?P<pk>\d+).gpx$', TrekGPXDetail.as_view(), name="trek_gpx_detail"),
    url(r'^api/trek/trek-(?P<pk>\d+).kml$', TrekKMLDetail.as_view(), name="trek_kml_detail"),
    url(r'^api/trek/(?P<pk>\d+)/profile.json$', ElevationProfile.as_view(model=models.Trek), name="trek_profile"),
    url(r'^api/trek/(?P<pk>\d+)/dem.json$', ElevationArea.as_view(model=models.Trek), name="trek_elevation_area"),
    url(r'^api/trek/(?P<pk>\d+)/profile.svg$', ElevationChart.as_view(model=models.Trek), name='trek_profile_svg'),
    url(r'^api/trek/(?P<pk>\d+)/pois.geojson$', TrekPOIGeoJSON.as_view(), name="trek_poi_geojson"),
    url(r'^api/trek/(?P<pk>\d+)/information_desks.geojson$', TrekInformationDeskGeoJSON.as_view(), name="trek_information_desk_geojson"),
    url(r'^popup/add/weblink/', WebLinkCreatePopup.as_view(), name='weblink_add'),
)

urlpatterns += registry.register(models.Trek)
urlpatterns += registry.register(models.POI)
Beispiel #2
0
from django.conf.urls import patterns, url

from mapentity import registry

from geotrek.altimetry.views import ElevationChart, ElevationArea
from geotrek.core.models import Path, Trail
from geotrek.core.views import get_graph_json


urlpatterns = patterns('',
    url(r'^api/graph.json$', get_graph_json, name="path_json_graph"),
    url(r'^api/path/(?P<pk>\d+)/dem.json$', ElevationArea.as_view(model=Path), name='path_elevation_area'),
    url(r'^api/path/(?P<pk>\d+)/profile.svg$', ElevationChart.as_view(model=Path), name='path_profile_svg'),
)

urlpatterns += registry.register(Path)
urlpatterns += registry.register(Trail)
Beispiel #3
0
        TrekJsonDetail.as_view(),
        name="trek_json_detail"),
    url(r'^api/trek/trek-(?P<pk>\d+).gpx$',
        TrekGPXDetail.as_view(),
        name="trek_gpx_detail"),
    url(r'^api/trek/trek-(?P<pk>\d+).kml$',
        TrekKMLDetail.as_view(),
        name="trek_kml_detail"),
    url(r'^api/trek/(?P<pk>\d+)/profile.json$',
        ElevationProfile.as_view(model=models.Trek),
        name="trek_profile"),
    url(r'^api/trek/(?P<pk>\d+)/dem.json$',
        ElevationArea.as_view(model=models.Trek),
        name="trek_elevation_area"),
    url(r'^api/trek/(?P<pk>\d+)/profile.svg$',
        ElevationChart.as_view(model=models.Trek),
        name='trek_profile_svg'),
    url(r'^api/trek/(?P<pk>\d+)/pois.geojson$',
        TrekPOIGeoJSON.as_view(),
        name="trek_poi_geojson"),
    url(r'^api/trek/(?P<pk>\d+)/information_desks.geojson$',
        TrekInformationDeskGeoJSON.as_view(),
        name="trek_information_desk_geojson"),
    url(r'^popup/add/weblink/',
        WebLinkCreatePopup.as_view(),
        name='weblink_add'),
)

urlpatterns += registry.register(models.Trek)
urlpatterns += registry.register(models.POI)
Beispiel #4
0
from django.conf import settings
from django.conf.urls import patterns, url

from mapentity import registry

from geotrek.altimetry.views import ElevationChart, ElevationArea
from geotrek.core.models import Path, Trail
from geotrek.core.views import get_graph_json


urlpatterns = patterns('',
    url(r'^api/graph.json$', get_graph_json, name="path_json_graph"),
    url(r'^api/path/(?P<pk>\d+)/dem.json$', ElevationArea.as_view(model=Path), name='path_elevation_area'),
    url(r'^api/path/(?P<pk>\d+)/profile.svg$', ElevationChart.as_view(model=Path), name='path_profile_svg'),
)

urlpatterns += registry.register(Path)
urlpatterns += registry.register(Trail, menu=settings.TRAIL_MODEL_ENABLED)