Exemple #1
0
 def sync_trek_infrastructures(self, lang, trek, zipfile=None):
     params = {'format': 'geojson'}
     view = TrekInfrastructureViewSet.as_view({'get': 'list'})
     name = os.path.join('api', lang, 'treks', str(trek.pk),
                         'infrastructures.geojson')
     self.sync_view(lang,
                    view,
                    name,
                    params=params,
                    zipfile=zipfile,
                    pk=trek.pk)
Exemple #2
0
from django.conf.urls import url

from mapentity.registry import registry

from . import models
from geotrek.trekking.views import TrekInfrastructureViewSet, TrekSignageViewSet

urlpatterns = registry.register(models.Infrastructure)
urlpatterns += registry.register(models.Signage)
urlpatterns += [
    url(r'^api/(?P<lang>\w\w)/treks/(?P<pk>\d+)/infrastructures\.geojson$',
        TrekInfrastructureViewSet.as_view({'get': 'list'}),
        name="trek_infrastructure_geojson"),
    url(r'^api/(?P<lang>\w\w)/treks/(?P<pk>\d+)/signages\.geojson$',
        TrekSignageViewSet.as_view({'get': 'list'}),
        name="trek_signage_geojson"),
]
from django.conf import settings
from django.conf.urls import url

from mapentity.registry import registry

from . import models
from geotrek.trekking.views import TrekInfrastructureViewSet


urlpatterns = registry.register(models.Infrastructure, menu=settings.INFRASTRUCTURE_MODEL_ENABLED)
urlpatterns += [
    url(r'^api/(?P<lang>\w\w)/treks/(?P<pk>\d+)/infrastructures\.geojson$',
        TrekInfrastructureViewSet.as_view({'get': 'list'}), name="trek_infrastructure_geojson"),
]
Exemple #4
0
 def sync_trek_infrastructures(self, lang, trek, zipfile=None):
     params = {'format': 'geojson'}
     view = TrekInfrastructureViewSet.as_view({'get': 'list'})
     name = os.path.join('api', lang, 'treks', str(trek.pk), 'infrastructures.geojson')
     self.sync_view(lang, view, name, params=params, zipfile=zipfile, pk=trek.pk)
Exemple #5
0
from django.conf.urls import url

from mapentity.registry import registry

from . import models
from geotrek.trekking.views import TrekInfrastructureViewSet


urlpatterns = registry.register(models.Infrastructure)
urlpatterns += [
    url(r'^api/(?P<lang>\w\w)/treks/(?P<pk>\d+)/infrastructures\.geojson$',
        TrekInfrastructureViewSet.as_view({'get': 'list'}), name="trek_infrastructure_geojson"),
]