Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
roomlist
Commits
ed2bf2fc
Commit
ed2bf2fc
authored
Jan 11, 2015
by
Daniel W Bond
Browse files
custom 404 and 500 error pages
parent
10d4ac4d
Changes
3
Show whitespace changes
Inline
Side-by-side
roomlist/settings/urls.py
View file @
ed2bf2fc
...
@@ -4,8 +4,8 @@ from django.views.generic import TemplateView
...
@@ -4,8 +4,8 @@ from django.views.generic import TemplateView
from
django.contrib
import
admin
from
django.contrib
import
admin
admin
.
autodiscover
()
admin
.
autodiscover
()
# custom 404
handle404
=
TemplateView
.
as_view
(
template_name
=
"404.html"
)
# custom 500
handle500
=
TemplateView
.
as_view
(
template_name
=
"500.html"
)
urlpatterns
=
patterns
(
''
,
urlpatterns
=
patterns
(
''
,
...
...
roomlist/templates/404.html
View file @
ed2bf2fc
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<title>
404
</title>
<title>
404
- Page Not Found
</title>
<style>
<style>
body
{
body
{
text-align
:
center
;
text-align
:
center
;
...
...
roomlist/templates/500.html
View file @
ed2bf2fc
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<title>
500 Server Error
</title>
<title>
500
- Internal
Server Error
</title>
<style>
<style>
body
{
body
{
text-align
:
center
;
text-align
:
center
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment