Adds 404 and 500 pages
they only show up when debug is off though, thankfully Fixes #112
This commit is contained in:
parent
e7d18dada1
commit
c6d887defe
4 changed files with 31 additions and 0 deletions
|
@ -25,6 +25,16 @@ def is_api_request(request):
|
|||
request.path[-5:] == '.json'
|
||||
|
||||
|
||||
def server_error_page(request):
|
||||
''' 500 errors '''
|
||||
return TemplateResponse(request, 'error.html')
|
||||
|
||||
|
||||
def not_found_page(request, _):
|
||||
''' 404s '''
|
||||
return TemplateResponse(request, 'notfound.html')
|
||||
|
||||
|
||||
@login_required
|
||||
def home(request):
|
||||
''' this is the same as the feed on the home tab '''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue