2023-10-19 06:49:13 +00:00
|
|
|
from django.shortcuts import render
|
2023-10-20 09:36:12 +00:00
|
|
|
from django.http import JsonResponse
|
|
|
|
from simulation import SimulationThread
|
|
|
|
|
2023-10-19 06:49:13 +00:00
|
|
|
|
|
|
|
def index(request):
|
2023-10-20 09:36:12 +00:00
|
|
|
return render(request, "trafficlightfrontend/index.html")
|
|
|
|
|
|
|
|
|
|
|
|
def status(request):
|
|
|
|
return JsonResponse(SimulationThread.get_instance().get_snapshot())
|