SOITA/config/views.py
Hubert Jankowski d9ad2c2f9d test visibility
2022-04-09 13:02:21 +02:00

24 lines
600 B
Python

from django.shortcuts import render, redirect
from django.template import loader
from django.contrib.auth.decorators import login_required
from trials.models import Test
@login_required
def home(request):
context = {}
# TODO replace
#context['tests'] = Test.objects.filter(owner=request.user)
#context['tests'] = Test.objects.all
context['tests'] = Test.objects.filter(visible=True)
return render(request, 'home.html', context)
@login_required
def help(request):
return render(request, 'help.html', )
def welcome(request):
return render(request, 'welcome.html')