Skip to content
Snippets Groups Projects
Commit 8f848da3 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

fix django exceptions when one clicks on the 'go back' button of its browser

parent ab897d56
No related branches found
No related tags found
No related merge requests found
......@@ -28,8 +28,11 @@ Examples:
"""
from django.conf.urls import url, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.shortcuts import redirect
from django.views.generic.base import RedirectView
favicon_view = RedirectView.as_view(url='/static/img/icons/swh-logo-32x32.png',
permanent=True)
def default_view(request):
......@@ -37,6 +40,7 @@ def default_view(request):
urlpatterns = [
url(r'^favicon\.ico$', favicon_view),
url(r'^api/', include('swh.web.api.urls')),
url(r'^$', default_view),
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment