Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/apps/pages/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from competitions.models import Competition, Submission, CompetitionParticipant
from profiles.models import User

from django.shortcuts import render


class HomeView(TemplateView):
template_name = 'pages/home.html'
Expand Down Expand Up @@ -62,3 +64,8 @@ def get_context_data(self, *args, **kwargs):
context = super().get_context_data(*args, **kwargs)
context['submissions'] = qs[:250]
return context


def page_not_found_view(request, exception):
print(request)
return render(request, '404.html', status=404)
Binary file added src/static/img/404.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/templates/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% extends "base.html" %}


{% block content %}
<div class="sixteen wide mobile eight wide computer centered column">
<img src="/static/img/404.png">
<p>Could not find the page you requested.</p>
<p>If you are the challenge organizer and this URL previously pointed to a valid competition and it is now missing please contact us at info@codabench.org for more information.</p>
<p> If this is an error, please file a <a href="https://github.com/codalab/codabench/issues/new">bug report</a>. For more information about Codabench, check out the <a href="https://github.com/codalab/codabench/wiki">wiki</a>.</p>
<a class="ui fluid blue submit button" href="/">Return to Home</a>
</div>
{% endblock %}