diff --git a/db.sqlite3 b/db.sqlite3 index 5eef67a..a5631b5 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/news/__pycache__/views.cpython-37.pyc b/news/__pycache__/views.cpython-37.pyc index a18a417..e3f10c5 100644 Binary files a/news/__pycache__/views.cpython-37.pyc and b/news/__pycache__/views.cpython-37.pyc differ diff --git a/news/static/news/css/app.css b/news/static/news/css/app.css index ab7ede9..0a85185 100644 --- a/news/static/news/css/app.css +++ b/news/static/news/css/app.css @@ -127,6 +127,7 @@ a h1 { .quote { padding: 15px; background-color: #333; + margin-bottom: 8px; } @media print, screen and (min-width: 40em) { .quote { diff --git a/news/templates/news/post.html b/news/templates/news/post.html index 5002146..ea06802 100644 --- a/news/templates/news/post.html +++ b/news/templates/news/post.html @@ -47,13 +47,15 @@
@@ -81,13 +83,13 @@ {% endif %} - + diff --git a/news/views.py b/news/views.py index 142d57c..4701cb1 100644 --- a/news/views.py +++ b/news/views.py @@ -1,4 +1,4 @@ -from django.shortcuts import render, get_object_or_404 +from django.shortcuts import render, get_object_or_404, redirect from django.http import HttpResponse, Http404, HttpResponseRedirect from django.template import loader from django.urls import reverse @@ -163,4 +163,4 @@ def upvote(request, comment_id): comment.voters.add(request.user) comment.save() post = comment.post - return render(request, 'news/post.html', {'post': post, 'comments': post.flat_comments(request.user) }) + return HttpResponseRedirect(reverse('news:post', args=(post.id,)))