Commit 44d44934 authored by Tang, Alexander's avatar Tang, Alexander
Browse files

Artikel kann unter URL hinterlegt werden. SlugField ist dafür von Django vorgesehen (ersetzt url)

Einhergehende Anpassungen an der all_blogs.html, Datenbank, etc.
Verschiebungen in der views.py
parent b3a0a1f1
......@@ -7,11 +7,15 @@ def all_blogs(request):
blogs = Blog.objects.all()
return render(request, 'blog/all_blogs.html',{'blogs':blogs})
# TODO: Fallback
class BlogDetailView(DetailView):
model = Blog
template_name = 'blog/detail.html'
# TODO wird nicht mehr aufgerufen
def detail(request, blog_id):
blog = get_object_or_404(Blog, pk=blog_id)
return render(request, 'blog/detail.html', {'blog':blog})
class BlogDetailView(DetailView):
model = Blog
template_name = 'blog/detail.html'
No preview for this file type
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