diff --git a/comments/views.py b/comments/views.py index fb5199bd410e3758df115d1d6ac6486979108c4f..1948eba503d787f78a5037c6f50ac9f85e187695 100644 --- a/comments/views.py +++ b/comments/views.py @@ -170,7 +170,7 @@ def reply_to_report(request, report_id): messages.success(request, '<h3>Thank you for contributing a Reply</h3>' 'It will soon be vetted by an Editor.') - return redirect(newcomment.submission.get_absolute_url()) + return redirect(newcomment.content_object.get_absolute_url()) context = {'report': report, 'is_author': is_author, 'form': form} return render(request, 'comments/reply_to_report.html', context) diff --git a/scipost/views.py b/scipost/views.py index 5d287072bdfd0f40103691857501dc7c44eba629..23e06a464777842493aca9acbe1d3d10a39ebde5 100644 --- a/scipost/views.py +++ b/scipost/views.py @@ -176,7 +176,7 @@ def search(request): def index(request): '''Main page.''' context = { - 'latest_newsitem': NewsItem.objects.all().order_by('-date').first(), + 'latest_newsitem': NewsItem.objects.filter(on_homepage=True).order_by('-date').first(), 'submissions': Submission.objects.public().order_by('-submission_date')[:3], 'journals': Journal.objects.order_by('name'), 'publications': Publication.objects.published().order_by('-publication_date',