a-current

a
This commit is contained in:
DerTyp187
2021-11-10 12:56:03 +01:00
parent 56d3037856
commit 3606b86c02
5 changed files with 45 additions and 37 deletions

View File

@@ -28,7 +28,8 @@ def category(req, category):
if category:
category_obj = Category.objects.filter(title = category).first()
if category_obj:
return render(req, "main/category.html", {'category_obj': category_obj})
topics_obj = Topic.objects.filter(category=category_obj)
return render(req, "main/category.html", {'category_obj': category_obj, 'topics': topics_obj})
return redirect("main-index")