# fargo - document box # Copyright (C) 2016-2019 Entr'ouvert # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . from django.conf import settings from django.conf.urls import include, url from django.contrib import admin from .fargo.views import (home, jsonp, json, document, download, pick, delete, upload, edit, remote_download, login, logout, pick_list, document_types, thumbnail) from .fargo.api_views import (push_document, recent_documents, router) urlpatterns = [ url(r'^$', home, name='home'), url(r'^pick/$', pick_list, name='list_to_pick'), url(r'^jsonp/$', jsonp, name='jsonp'), url(r'^json/$', json, name='json'), url(r'^(?P\d+)/$', document, name='document'), url(r'^(?P\d+)/edit/$', edit, name='edit'), url(r'^(?P\d+)/delete/$', delete, name='delete'), url(r'^(?P\d+)/pick/$', pick, name='pick'), url(r'^(?P\d+)/download/(?P[^/]*)$', download, name='download'), url(r'^(?P\d+)/thumbnail/(?P[^/]*)$', thumbnail, name='thumbnail'), url(r'^upload/$', upload, name='upload'), url(r'^remote-download/(?P[^/]*)$', remote_download, name='remote_download'), url(r'^admin/', include(admin.site.urls)), url(r'^login/$', login, name='auth_login'), url(r'^logout/$', logout, name='auth_logout'), url(r'^document-types/$', document_types, name='document_types'), url(r'^api/documents/push/$', push_document, name='fargo-api-push-document'), url(r'^api/documents/recently-added/$', recent_documents), url(r'^api/', include(router.urls)), url(r'^api/', include('fargo.oauth2.urls')), ] if settings.DEBUG and 'debug_toolbar' in settings.INSTALLED_APPS: import debug_toolbar urlpatterns = [ url(r'^__debug__/', include(debug_toolbar.urls)), ] + urlpatterns if 'mellon' in settings.INSTALLED_APPS: urlpatterns.append(url(r'^accounts/mellon/', include('mellon.urls')))