sprint/Main/views/TaskRuntimeView.py
Egor Matveev d2d427fd6e codestyle
2021-12-02 18:24:51 +03:00

19 lines
528 B
Python

from django.http import HttpResponse
from Main.models import Progress
from SprintLib.BaseView import BaseView
class TaskRuntimeView(BaseView):
view_file = "task_runtime.html"
required_login = True
endpoint = "task_runtime"
def get(self):
progress = Progress.objects.get(task=self.entities.task, user=self.request.user)
self.context["progress"] = progress
if "render" in self.request.GET.keys():
return
if progress.finished:
return HttpResponse("done")