added first public views - no check for access rights at the moment

This commit is contained in:
Holger Sielaff
2024-07-12 17:22:17 +02:00
parent 7d53df6ea5
commit 3640ab759d
22 changed files with 386 additions and 69 deletions

13
content/views/public.py Normal file
View File

@@ -0,0 +1,13 @@
from django.shortcuts import render
from content.models import Question
def search_question(request):
term = request.GET.get('term')
items = []
if term:
items = Question.get_by_tearchterm(term)
else:
items = Question.objects.all()[:10]
return render(request, 'questions.html', {'items': items})