mirror of
https://github.com/DerTyp7/tealcode-django-python.git
synced 2025-10-30 20:57:07 +01:00
a-current
a
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user