urls: coding style (#29240)
This commit is contained in:
parent
d6661ec386
commit
31dfd4e853
36
hobo/urls.py
36
hobo/urls.py
|
@ -1,8 +1,23 @@
|
|||
# hobo - portal to configure and deploy applications
|
||||
# Copyright (C) 2015-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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls import include, url
|
||||
|
||||
from django.contrib import admin
|
||||
admin.autodiscover()
|
||||
|
||||
from .views import admin_required, login, login_local, logout, home, health_json, menu_json, hobo
|
||||
from .urls_utils import decorated_includes
|
||||
|
@ -13,18 +28,15 @@ from .profile.urls import urlpatterns as profile_urls
|
|||
from .theme.urls import urlpatterns as theme_urls
|
||||
from .emails.urls import urlpatterns as emails_urls
|
||||
|
||||
admin.autodiscover()
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', home, name='home'),
|
||||
url(r'^sites/', decorated_includes(admin_required,
|
||||
include(environment_urls))),
|
||||
url(r'^profile/', decorated_includes(admin_required,
|
||||
include(profile_urls))),
|
||||
url(r'^franceconnect/',
|
||||
decorated_includes(admin_required, include(franceconnect_urls))),
|
||||
url(r'^matomo/',
|
||||
decorated_includes(admin_required, include(matomo_urls))),
|
||||
url(r'^theme/', decorated_includes(admin_required,
|
||||
include(theme_urls))),
|
||||
url(r'^sites/', decorated_includes(admin_required, include(environment_urls))),
|
||||
url(r'^profile/', decorated_includes(admin_required, include(profile_urls))),
|
||||
url(r'^franceconnect/', decorated_includes(admin_required, include(franceconnect_urls))),
|
||||
url(r'^matomo/', decorated_includes(admin_required, include(matomo_urls))),
|
||||
url(r'^theme/', decorated_includes(admin_required, include(theme_urls))),
|
||||
url(r'^emails/', decorated_includes(admin_required, include(emails_urls))),
|
||||
url(r'^api/health/$', health_json, name='health-json'),
|
||||
url(r'^menu.json$', menu_json, name='menu_json'),
|
||||
|
@ -36,7 +48,7 @@ urlpatterns = [
|
|||
urlpatterns += [
|
||||
url(r'^logout/$', logout, name='logout'),
|
||||
url(r'^login/$', login, name='auth_login'),
|
||||
url(r'^login/local/$', login_local), # to be used as backup, in case of idp down
|
||||
url(r'^login/local/$', login_local), # to be used as backup, in case of idp down
|
||||
url(r'^accounts/mellon/', include('mellon.urls')),
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in New Issue