diff --git a/.gitignore b/.gitignore index b4a79c2e0e..d2fad4d64c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,11 @@ *.egg-info .dmypy.json +# pyenv +# For a library or package, you might want to ignore these files since the +# code is intended to run in multiple environments; otherwise, check them in: +.python-version + # no compiled files! *.class *.pyc diff --git a/cl/opinion_page/views.py b/cl/opinion_page/views.py index ed9d744a9c..abf393788e 100644 --- a/cl/opinion_page/views.py +++ b/cl/opinion_page/views.py @@ -818,7 +818,6 @@ def citation_redirector( This uses the same infrastructure as the thing that identifies citations in the text of opinions. """ - if request.method == "POST": form = CitationRedirectorForm(request.POST) if form.is_valid(): @@ -868,7 +867,10 @@ def citation_redirector( slug_edition = {slugify(item): item for item in EDITIONS.keys()} proper_reporter = slug_edition.get(SafeText(reporter), None) if not proper_reporter: - return HttpResponse(status=404) + return throw_404( + request, + {"no_reporters": True, "reporter": reporter, "private": False}, + ) # We have a reporter (show volumes in it), a volume (show cases in # it), or a citation (show matching citation(s)) if proper_reporter and volume and page: