add login_required decorator

This commit is contained in:
Robert Einsle 2017-02-03 09:42:23 +01:00
parent a003fbcf19
commit 47ba4b0b67

View File

@ -4,6 +4,7 @@ from rest_framework import viewsets
from django.shortcuts import render from django.shortcuts import render
from django.views import generic from django.views import generic
from django.views.generic.detail import DetailView from django.views.generic.detail import DetailView
from django.contrib.auth.decorators import login_required
class ClientViewSet(viewsets.ModelViewSet): class ClientViewSet(viewsets.ModelViewSet):
@ -34,6 +35,7 @@ class LocationDataDetailView(DetailView):
model = LocationData model = LocationData
@login_required
def index(request): def index(request):
loc = 1 loc = 1
if request.POST: if request.POST: