rewrite frontend and logic in core app
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user