Commit 2c6cd9c2 authored by Rafal's avatar Rafal

add new view

parent 17bb698f
......@@ -10,6 +10,7 @@ from Hub.views import login_page, main_page, dashboard, project, beacons
router = routers.DefaultRouter()
router.register(r'beacons', hub_views.BeaconViewSet)
router.register(r'beacon_managers', hub_views.BeaconManagerViewSet)
router.register(r'full_beacon_managers', hub_views.FullBeaconManagerViewSet)
router.register(r'category', hub_views.CategoryViewSet)
router.register(r'sites', hub_views.SiteViewSet)
router.register(r'uuid', hub_views.UuidBeaconViewSet)
......
......@@ -14,7 +14,7 @@ from rest_framework.response import Response
from rest_framework.views import APIView
from Hub.models import Beacon, BeaconManager, Site, Category, UserProject
from Hub.serializers import BeaconSerializer, BeaconManagerSerializer, SiteSerializer, CategorySerializer, \
UserSerializer, UserProjectSerializer, FullUserProjectSerializer
UserSerializer, UserProjectSerializer, FullUserProjectSerializer, FullBeaconManagerSerializer
class BeaconViewSet(viewsets.ModelViewSet):
......@@ -39,6 +39,14 @@ class BeaconManagerViewSet(viewsets.ModelViewSet):
queryset = BeaconManager.objects.all()
serializer_class = BeaconManagerSerializer
class FullBeaconManagerViewSet(viewsets.ModelViewSet):
"""
API for places
"""
queryset = BeaconManager.objects.all()
serializer_class = FullBeaconManagerSerializer
class UserProjectViewSet(viewsets.ModelViewSet):
"""
API for places
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment