Commit 4920c63e authored by Behr, Svenja's avatar Behr, Svenja
Browse files

- Kosmetik

parent 3ab6a5ef
......@@ -55,9 +55,7 @@ def detail(request, slug):
If comments are allowed, they will be shown as well (uses an extended template)
"""
blogs = get_all_blogs(request)
blog_result = Blog.objects.filter(slug=slug)
if blog_result.count() == 0:
raise Http404("Url does not exist")
......@@ -75,9 +73,9 @@ def detail(request, slug):
form = CommentForm(initial={'related_blog': blog.id})
# render with comments
return render(request, 'blog/detail_with_comments.html',
{'blog': blog, 'comments': comments, 'comment_form': form, 'blogs': blogs})
{'blog': blog, 'comments': comments, 'comment_form': form, 'blogs': (get_all_blogs(request))})
return render(request, 'blog/detail.html', {'blog': blog, 'blogs': blogs})
return render(request, 'blog/detail.html', {'blog': blog, 'blogs': (get_all_blogs(request))})
def save_comment(request):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment