vpnmanager/manager/views.py

14 lines
404 B
Python
Raw Normal View History

2018-11-25 15:05:26 +00:00
from django.shortcuts import render, get_object_or_404
from django.http import HttpResponse
from .models import Device
# Create your views here.
def index(request):
return HttpResponse("This.")
def getHosts(request):
# TODO - Turn this GET into a POST
device = get_object_or_404(Device, secret=request.GET.get("secret", ""))
return render(request, "manager/hosts", {"device": device})