Commit ca635f38 authored by Mirko Vucicevich's avatar Mirko Vucicevich

Merge branch 'default-404-page' into 'master'

Add default 404 page

See merge request !54
parents 24d9bf15 42041cb1
......@@ -50,6 +50,12 @@ class SignUp(generic.CreateView):
success_url = reverse_lazy('home')
template_name = 'registration/signup.html'
def handler404(request, exception):
response = render(request, 'UI/404.html',)
response.status_code = 404
return response
@login_required
@vary_on_cookie
def frontpage(request):
......
......@@ -27,6 +27,8 @@ from layers.api import *
router = routers.SimpleRouter()
router.register(r'layer', LayerAPIViewset, base_name='layer')
handler404 = layers.views.handler404
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^dashboard/', layers.dashboard.dashboard_all, name="dashboard"),
......
{% extends 'UI/skin.html' %}
{% block style %}
<style>
.page-not-found {
display: block;
margin-left: auto;
margin-right: auto;
text-align: center;
}
p {
margin-bottom: 3em;
}
</style>
{% endblock %}
{% block body %}
<div class="page-not-found">
<h1>Page Not Found</h1>
<p>Sorry, but the page you were trying to view does not exist.</p>
<a href={% url 'home' %} class="btn btn-primary btn-lg">Back to Homepage</a>
</div>
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment