1
1

rewrite frontend and logic in core app

This commit is contained in:
2021-01-10 21:25:43 +01:00
parent 37f698d82b
commit 652cea79ae
10 changed files with 318 additions and 30 deletions

View File

@@ -1,3 +1,13 @@
from django.shortcuts import render
from django.views.generic import TemplateView
# Create your views here.
from core.models import Subject
from core.prediction import predict_all
class SubjectsView(TemplateView):
template_name = "core/subjects.html"
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["prediction_list"] = predict_all(Subject.objects.order_by("name"))
return context