diff --git a/wlokalu/api/v1/urls.py b/wlokalu/api/v1/urls.py index f0bbb64..ac5ff85 100644 --- a/wlokalu/api/v1/urls.py +++ b/wlokalu/api/v1/urls.py @@ -6,6 +6,7 @@ from django.conf import settings #----------------------------------------------------------------------------- urlpatterns = patterns('wlokalu.api.v1.views', + (r'^$', 'list_elements', {'subpages': ['person', 'sensor']}), (r'^person/?$', 'list_presence'), (r'^person/(?P.+)$', 'person'), (r'^sensor/?$', 'list_sensors'), diff --git a/wlokalu/api/v1/views.py b/wlokalu/api/v1/views.py index c4f1551..9b23ddf 100644 --- a/wlokalu/api/v1/views.py +++ b/wlokalu/api/v1/views.py @@ -25,6 +25,13 @@ def return_json(function): #----------------------------------------------------------------------------- +@csrf_exempt +@return_json +def list_elements(request, subpages): + return subpages + +#----------------------------------------------------------------------------- + @csrf_exempt @return_json def person(request, nick):