14 lines
322 B
Python
14 lines
322 B
Python
from django.shortcuts import render
|
|
from django.conf import settings
|
|
from .models import DetectionHistory
|
|
|
|
def stream_view(request):
|
|
history = DetectionHistory.objects.all()[:20]
|
|
return render(request, 'streaming/stream.html',{
|
|
"websocket_url": settings.WEBSOCKET_URL,
|
|
"history": history
|
|
})
|
|
|
|
|
|
|