https://forge.softwareheritage.org/source/swh-deposit.git
Raw File
Tip revision: ef4fbb9df60587331caba7343c1af3895b0bcf61 authored by Jenkins for Software Heritage on 30 October 2019, 15:56:16 UTC
Updated backport on stretch-swh from debian/0.0.75-1_swh1 (unstable-swh)
Tip revision: ef4fbb9
urls.py
# Copyright (C) 2017-2018  The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information

"""swhdeposit URL Configuration

"""

from django.conf.urls import url, include
from django.shortcuts import render
from django.views.generic.base import RedirectView
from rest_framework.urlpatterns import format_suffix_patterns

favicon_view = RedirectView.as_view(url='/static/img/icons/swh-logo-32x32.png',
                                    permanent=True)


def default_view(req):
    return render(req, "homepage.html")


urlpatterns = [
    url(r'^favicon\.ico$', favicon_view),
    url(r'^1/', include('swh.deposit.api.urls')),
    url(r'^1/private/', include('swh.deposit.api.private.urls')),
    url(r'^$', default_view, name='home'),
]

urlpatterns = format_suffix_patterns(urlpatterns)
back to top