Commit 521cc998 authored by Falk, Dennis Nikolas's avatar Falk, Dennis Nikolas
Browse files

kleine Änderungen

parent 6d6ffb5b
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseNotAllowed, Http404
from django.contrib import messages
from django.shortcuts import render, get_object_or_404, redirect
......@@ -8,7 +7,6 @@ from django.contrib.auth import authenticate, login, logout
from .forms import CommentForm
from .models import *
from django.views.generic import DetailView
def get_all_blogs(request):
......@@ -47,7 +45,7 @@ def detail(request, slug):
blogs = get_all_blogs(request)
blogResult = Blog.objects.filter(slug=slug)
print(blogResult)
if blogResult.count() == 0:
raise Http404("Url does not exist")
......
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