Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
django==1.11.27 #LTS
django==1.11.29 #LTS
coreapi==2.3.3
dj-database-url==0.5.0
timeago==1.0.10

flower==0.9.2
flower==0.9.5
tornado<6
sentry-sdk==0.7.3
sentry-sdk==0.19.5
celery==4.2.1
gevent==1.2.2
greenlet==0.4.12
Expand Down
21 changes: 15 additions & 6 deletions sensorsafrica/api/v2/router.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
from rest_framework import routers
from django.conf.urls import url, include

from .views import CitiesView, NodesView, SensorDataStatsView, SensorLocationsView, SensorTypesView, SensorsView
from .views import (
CitiesView,
NodesView,
SensorDataStatsView,
SensorDataView,
SensorLocationsView,
SensorTypesView,
SensorsView,
)

stat_data_router = routers.DefaultRouter()
stat_data_router.register(r"", SensorDataStatsView)

data_router = routers.DefaultRouter()

data_router.register(r"", SensorDataStatsView)
data_router.register(r"", SensorDataView)

cities_router = routers.DefaultRouter()

cities_router.register(r"", CitiesView, basename="cities")

nodes_router = routers.DefaultRouter()

nodes_router.register(r"", NodesView, basename="map")

sensors_router = routers.DefaultRouter()
Expand All @@ -25,7 +33,8 @@
sensor_types_router.register(r"", SensorTypesView, basename="sensor_types")

api_urls = [
url(r"data/(?P<sensor_type>[air]+)/", include(data_router.urls)),
url(r"data/(?P<sensor_type>[air]+)/", include(stat_data_router.urls)),
url(r"data/", include(data_router.urls)),
url(r"cities/", include(cities_router.urls)),
url(r"nodes/", include(nodes_router.urls)),
url(r"locations/", include(sensor_locations_router.urls)),
Expand Down
Loading