13 lines
404 B
Python
13 lines
404 B
Python
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})
|