mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-01 22:11:16 +00:00
Fixes error pages
This commit is contained in:
parent
e86f160c53
commit
28f07f7729
5 changed files with 2 additions and 16 deletions
|
@ -44,9 +44,9 @@
|
||||||
<div class="card block">
|
<div class="card block">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<span class="media-left">
|
<a href="{{ user.local_path }}" class="media-left">
|
||||||
{% include 'snippets/avatar.html' with user=user large=True %}
|
{% include 'snippets/avatar.html' with user=user large=True %}
|
||||||
</span>
|
</a>
|
||||||
<div class="media-content">
|
<div class="media-content">
|
||||||
<a href="{{ user.local_path }}" class="is-block mb-2">
|
<a href="{{ user.local_path }}" class="is-block mb-2">
|
||||||
<span class="title is-4 is-block">{{ user.display_name }}</span>
|
<span class="title is-4 is-block">{{ user.display_name }}</span>
|
||||||
|
|
|
@ -23,8 +23,6 @@ status_path = r"%s/(%s)/(?P<status_id>\d+)" % (user_path, "|".join(status_types)
|
||||||
|
|
||||||
book_path = r"^book/(?P<book_id>\d+)"
|
book_path = r"^book/(?P<book_id>\d+)"
|
||||||
|
|
||||||
handler404 = "bookwyrm.views.not_found_page"
|
|
||||||
handler500 = "bookwyrm.views.server_error_page"
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("admin/", admin.site.urls),
|
path("admin/", admin.site.urls),
|
||||||
path(
|
path(
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
""" something has gone amiss """
|
|
||||||
from django.template.response import TemplateResponse
|
|
||||||
|
|
||||||
|
|
||||||
def server_error_page(request):
|
|
||||||
""" 500 errors """
|
|
||||||
return TemplateResponse(request, "error.html", status=500)
|
|
||||||
|
|
||||||
|
|
||||||
def not_found_page(request, _):
|
|
||||||
""" 404s """
|
|
||||||
return TemplateResponse(request, "notfound.html", status=404)
|
|
Loading…
Reference in a new issue