Avoid returning HttpServerError for things not server errors
authorMagnus Hagander <magnus@hagander.net>
Sat, 4 Apr 2020 12:43:27 +0000 (14:43 +0200)
committerMagnus Hagander <magnus@hagander.net>
Sat, 4 Apr 2020 12:43:27 +0000 (14:43 +0200)
commitb405302d973a31e212125081184ab8cf17b0be71
tree16a8e7638b481a1ef1b375103c8f76962acf8c97
parent454ea7a7be2e99ed292acf7d0fe55c0036d72b3e
Avoid returning HttpServerError for things not server errors

With the new django, alerts are raised for everything with status 500,
not juse exceptions. This put a light on a number of places where we
were returning 500 server error code for things that are not actually
server errors. Some should be a regular 200 ok with an error message,
and others should be a permissions error.
pgweb/account/views.py
pgweb/core/views.py
pgweb/downloads/views.py
pgweb/survey/views.py
pgweb/util/helpers.py
templates/simple.html [new file with mode: 0644]