# Path: spillway/views.py
# class RasterTileView(mixins.ResponseExceptionMixin, GenericAPIView):
# class TileView(mixins.ResponseExceptionMixin, BaseGeoView, ListAPIView):
#     def get(self, request, *args, **kwargs):
#     def get(self, request, *args, **kwargs):
# 
# Path: spillway/urls.py
# def tilepath(regex):
#     """Appends a tile path regex to a url path."""
#     return r''.join((regex, tileregex))
# 
# Path: tests/models.py
# class Location(AbstractLocation):
#     """Test location."""
#     objects = GeoQuerySet.as_manager()
# 
# class RasterStore(AbstractRasterStore):
#     objects = RasterQuerySet.as_manager()
# 
# Path: tests/test_viewsets.py
# class GeoLocationViewSet(viewsets.GeoModelViewSet):
#     queryset = GeoLocation.objects.all()
#     serializer_class = LocationFeatureSerializer
# 
# class LocationViewSet(viewsets.GeoModelViewSet):
#     queryset = Location.objects.all()
#     serializer_class = LocationFeatureSerializer
# 
# class RasterViewSet(viewsets.ReadOnlyRasterModelViewSet):
#     queryset = RasterStore.objects.all()
#     serializer_class = RasterStoreSerializer


from django.conf.urls import include, url
from rest_framework.routers import DefaultRouter
from spillway import views
from spillway.urls import tilepath
from .models import Location, RasterStore
from .test_viewsets import GeoLocationViewSet, LocationViewSet, RasterViewSet


router = DefaultRouter()
router.register(r'glocations', GeoLocationViewSet)
router.register(r'locations', LocationViewSet)
router.register(r'rasters', RasterViewSet)

urlpatterns = [
    url(r'^', include(router.urls)),
    url(tilepath('^vectiles/'),
        views.TileView.as_view(queryset=Location.objects.all()),
        name='location-tiles'),
    url(tilepath('^maptiles/(?P<pk>\d+)/'),

# Path: spillway/views.py
# class RasterTileView(mixins.ResponseExceptionMixin, GenericAPIView):
# class TileView(mixins.ResponseExceptionMixin, BaseGeoView, ListAPIView):
#     def get(self, request, *args, **kwargs):
#     def get(self, request, *args, **kwargs):
# 
# Path: spillway/urls.py
# def tilepath(regex):
#     """Appends a tile path regex to a url path."""
#     return r''.join((regex, tileregex))
# 
# Path: tests/models.py
# class Location(AbstractLocation):
#     """Test location."""
#     objects = GeoQuerySet.as_manager()
# 
# class RasterStore(AbstractRasterStore):
#     objects = RasterQuerySet.as_manager()
# 
# Path: tests/test_viewsets.py
# class GeoLocationViewSet(viewsets.GeoModelViewSet):
#     queryset = GeoLocation.objects.all()
#     serializer_class = LocationFeatureSerializer
# 
# class LocationViewSet(viewsets.GeoModelViewSet):
#     queryset = Location.objects.all()
#     serializer_class = LocationFeatureSerializer
# 
# class RasterViewSet(viewsets.ReadOnlyRasterModelViewSet):
#     queryset = RasterStore.objects.all()
#     serializer_class = RasterStoreSerializer


# Path: tests/urls.py
from django.conf.urls import include, url
from rest_framework.routers import DefaultRouter
from spillway import views
from spillway.urls import tilepath
from .models import Location, RasterStore
from .test_viewsets import GeoLocationViewSet, LocationViewSet, RasterViewSet



router = DefaultRouter()
router.register(r'glocations', GeoLocationViewSet)
router.register(r'locations', LocationViewSet)
router.register(r'rasters', RasterViewSet)

urlpatterns = [
    url(r'^', include(router.urls)),
    url(tilepath('^vectiles/'),
        views.TileView.as_view(queryset=Location.objects.all()),
        name='location-tiles'),
    url(tilepath('^maptiles/(?P<pk>\d+)/'),

        views.RasterTileView.as_view(queryset=RasterStore.objects.all()),