Skip to content
Snippets Groups Projects
Commit f9482e0d authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[urls] Migrate to new Django style using path

parent 60b19050
No related branches found
No related tags found
2 merge requests!394Migrate urls files,!342Django 3 migration
Pipeline #43206 passed
Showing with 200 additions and 184 deletions
......@@ -25,20 +25,21 @@
# #
###############################################################################
from django.conf.urls import url
from django.urls import path
from django.urls import re_path
from . import views
app_name = "accounts"
urlpatterns = [
url(r"^settings/$", views.account_settings, name="settings"),
url(
path("settings/", views.account_settings, name="settings"),
re_path(
r"^validation/(?P<hash_url>\w+)/$",
views.load_temporary_url_validation,
name="temp_url_validation",
),
url(
re_path(
r"^rejection/(?P<hash_url>\w+)/$",
views.load_temporary_url_rejection,
name="temp_url_rejection",
......
......@@ -25,38 +25,38 @@
# #
###############################################################################
from django.conf.urls import url
from django.urls import path
from django.urls import re_path
from . import views
app_name = "algorithms"
urlpatterns = [
url(r"^new/$", views.create, name="new",),
url(r"^update/(?P<name>[-\w]+)/$", views.create, name="new-version",),
url(r"^$", views.public_ls, name="public-list",),
url(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
url(
path("new/", views.create, name="new",),
re_path(r"^update/(?P<name>[-\w]+)/$", views.create, name="new-version",),
path("", views.public_ls, name="public-list",),
re_path(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
re_path(
r"^fork/(?P<author>\w+)/(?P<name>[-\w]+)/(?P<version>\d+)/$",
views.fork,
name="fork",
),
url(
re_path(
r"^edit/(?P<author>\w+)/(?P<name>[-\w]+)/(?P<version>\d+)/$",
views.edit,
name="edit",
),
url(
re_path(
r"^diff/(?P<author1>\w+)/(?P<name1>[-\w]+)/(?P<version1>\d+)/(?P<author2>\w+)/(?P<name2>[-\w]+)/(?P<version2>\d+)/$",
views.diff,
name="diff",
),
url(r"^(?P<author>\w+)/(?P<name>[-\w]+)/$", views.view, name="view-latest",),
url(
re_path(r"^(?P<author>\w+)/(?P<name>[-\w]+)/$", views.view, name="view-latest",),
re_path(
r"^(?P<author>\w+)/(?P<name>[-\w]+)/(?P<version>\d+)/$",
views.view,
name="view",
),
url(r"^$", views.public_ls, name="public-list",),
url(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
re_path(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
]
......@@ -25,14 +25,15 @@
# #
###############################################################################
from django.conf.urls import url
from django.urls import path
from django.urls import re_path
from . import views
app_name = "attestations"
urlpatterns = [
url(r"^$", views.public_ls, name="public-list",),
url(r"^(?P<number>\d+)/$", views.view, name="view",),
url(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
path("", views.public_ls, name="public-list",),
path("<int:number>/", views.view, name="view",),
re_path(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
]
......@@ -25,24 +25,23 @@
# #
###############################################################################
from django.conf.urls import url
from django.urls import path
from django.urls import re_path
from . import views
app_name = "backend"
urlpatterns = [
url(r"^scheduler/$", views.scheduler, name="scheduler",),
url(
r"^cancel-experiments/$",
views.cancel_all_experiments,
name="cancel-experiments",
path("scheduler/", views.scheduler, name="scheduler",),
path(
"cancel-experiments/", views.cancel_all_experiments, name="cancel-experiments",
),
url(r"^update-workers/$", views.update_workers, name="update-workers",),
url(
path("update-workers/", views.update_workers, name="update-workers",),
re_path(
r"^environments/(?P<name>[-\.\w\s+]+)/(?P<version>[-\.\w]+)/$",
views.environment,
name="view-environment",
),
url(r"^environments/$", views.list_environments, name="list-environments",),
path("environments/", views.list_environments, name="list-environments",),
]
......@@ -25,14 +25,15 @@
# #
###############################################################################
from django.conf.urls import url
from django.urls import path
from django.urls import re_path
from . import views
app_name = "databases"
urlpatterns = [
url(r"^$", views.ls, name="list",),
url(r"^(?P<name>[-\w]+)/(?P<version>\d+)/$", views.view, name="view"),
url(r"^(?P<name>[-\w]+)/$", views.view, name="view-latest",),
path(r"", views.ls, name="list",),
re_path(r"^(?P<name>[-\w]+)/(?P<version>\d+)/$", views.view, name="view"),
re_path(r"^(?P<name>[-\w]+)/$", views.view, name="view-latest",),
]
......@@ -25,36 +25,37 @@
# #
###############################################################################
from django.conf.urls import url
from django.urls import path
from django.urls import re_path
from . import views
app_name = "dataformats"
urlpatterns = [
url(r"^new/$", views.create, name="new",),
url(r"^update/(?P<name>[-\w]+)/$", views.create, name="new-version",),
url(r"^$", views.public_ls, name="public-list",),
url(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
url(
path("new/", views.create, name="new",),
re_path(r"^update/(?P<name>[-\w]+)/$", views.create, name="new-version",),
path("", views.public_ls, name="public-list",),
re_path(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
re_path(
r"^fork/(?P<author>\w+)/(?P<name>[-\w]+)/(?P<version>\d+)/$",
views.fork,
name="fork",
),
url(
re_path(
r"^edit/(?P<author>\w+)/(?P<name>[-\w]+)/(?P<version>\d+)/$",
views.edit,
name="edit",
),
url(
re_path(
r"^diff/(?P<author1>\w+)/(?P<name1>[-\w]+)/(?P<version1>\d+)/(?P<author2>\w+)/(?P<name2>[-\w]+)/(?P<version2>\d+)/$",
views.diff,
name="diff",
),
url(
re_path(
r"^(?P<author>\w+)/(?P<name>[-\w]+)/(?P<version>\d+)/$",
views.view,
name="view",
),
url(r"^(?P<author>\w+)/(?P<name>[-\w]+)/$", views.view, name="view-latest",),
re_path(r"^(?P<author>\w+)/(?P<name>[-\w]+)/$", views.view, name="view-latest",),
]
......@@ -25,33 +25,34 @@
# #
###############################################################################
from django.conf.urls import url
from django.urls import path
from django.urls import re_path
from . import views
app_name = "experiments"
urlpatterns = [
url(
re_path(
r"^setup/(?P<toolchain_author_name>[-\w]+)/(?P<toolchain_name>[-\w]+)/(?P<toolchain_version>\d+)/$",
views.new_from_toolchain,
name="new-from-toolchain",
),
url(
re_path(
r"^reset/(?P<toolchain_author_name>[-\w]+)/(?P<toolchain_name>[-\w]+)/(?P<toolchain_version>\d+)/(?P<name>[-\w]+)/$",
views.reset,
name="reset",
),
url(
re_path(
r"^fork/(?P<author_name>\w+)/(?P<toolchain_author_name>[-\w]+)/(?P<toolchain_name>[-\w]+)/(?P<toolchain_version>\d+)/(?P<name>[-\w]+)/$",
views.fork,
name="fork",
),
url(
re_path(
r"^(?P<author_name>\w+)/(?P<toolchain_author_name>[-\w]+)/(?P<toolchain_name>[-\w]+)/(?P<toolchain_version>\d+)/(?P<name>[-\w]+)/$",
views.view,
name="view",
),
url(r"^$", views.public_ls, name="public-list",),
url(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
path("", views.public_ls, name="public-list",),
re_path(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
]
......@@ -25,36 +25,39 @@
# #
###############################################################################
from django.conf.urls import url
from django.urls import path
from django.urls import re_path
from . import views
app_name = "libraries"
urlpatterns = [
url(r"^new/$", views.create, name="new",),
url(r"^update/(?P<name>[-\w]+)/$", views.new_version, name="new-version",),
url(
path("new/", views.create, name="new",),
re_path(r"^update/(?P<name>[-\w]+)/$", views.new_version, name="new-version",),
re_path(
r"^fork/(?P<author_name>\w+)/(?P<name>[-\w]+)/(?P<version>\d+)/$",
views.fork,
name="fork",
),
url(
re_path(
r"^edit/(?P<author_name>\w+)/(?P<name>[-\w]+)/(?P<version>\d+)/$",
views.edit,
name="edit",
),
url(
re_path(
r"^diff/(?P<author1>\w+)/(?P<name1>[-\w]+)/(?P<version1>\d+)/(?P<author2>\w+)/(?P<name2>[-\w]+)/(?P<version2>\d+)/$",
views.diff,
name="diff",
),
url(
re_path(
r"^(?P<author_name>\w+)/(?P<name>[-\w]+)/(?P<version>\d+)/$",
views.view,
name="view",
),
url(r"^(?P<author_name>\w+)/(?P<name>[-\w]+)/$", views.view, name="view-latest",),
url(r"^$", views.public_ls, name="public-list",),
url(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
re_path(
r"^(?P<author_name>\w+)/(?P<name>[-\w]+)/$", views.view, name="view-latest",
),
path("", views.public_ls, name="public-list",),
re_path(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
]
......@@ -25,12 +25,12 @@
# #
###############################################################################
from django.conf.urls import url
from django.urls import path
from . import views
urlpatterns = [
url(r"^tos/$", views.terms_of_service, name="terms-of-service",),
url(r"^disclaimer/$", views.legal_disclaimer, name="legal-disclaimer",),
url(r"^contact/$", views.contact, name="contact",),
path("tos/", views.terms_of_service, name="terms-of-service",),
path("disclaimer/", views.legal_disclaimer, name="legal-disclaimer",),
path("contact/", views.contact, name="contact",),
]
......@@ -25,8 +25,9 @@
# #
###############################################################################
from django.conf.urls import include
from django.conf.urls import url
from django.urls import include
from django.urls import path
from django.urls import re_path
from . import views
......@@ -34,21 +35,21 @@ app_name = "plotters"
partial_patterns = (
[
url(
r"^plotinfo/$",
path(
"plotinfo",
views.PartialGroupView.as_view(
template_name="plotterparameters/partials/plotgraphicinfo.html",
),
name="plotinfo",
),
url(
r"^plotparamsinfo/$",
path(
"plotparamsinfo/",
views.PartialGroupView.as_view(
template_name="plotterparameters/partials/plotparamsinfo.html",
),
name="plotinfo",
),
url(
re_path(
r"^(?P<template_name>[a-zA-Z_]+\.html)$", views.PartialGroupView.as_view(),
),
],
......@@ -56,61 +57,61 @@ partial_patterns = (
)
urlpatterns = [
url(r"^partials/", include(partial_patterns),),
url(r"^$", views.list_plotters, name="list",),
url(r"^plot/$", views.plot, name="plot",),
url(r"^plot_sample/$", views.plot_sample, name="plot_sample",),
url(
r"^plot_sample_with_params/$",
path("partials/", include(partial_patterns),),
path("", views.list_plotters, name="list",),
path("plot/", views.plot, name="plot",),
path("plot_sample/", views.plot_sample, name="plot_sample",),
path(
"plot_sample_with_params/",
views.plot_sample_with_params,
name="plot_sample_with_params",
),
url(
re_path(
r"^plotterparameter/(?P<author_name>\w+)/new_plotterparameter/$",
views.create_plotterparameter,
name="new_plotterparameter",
),
url(
re_path(
r"^plotterparameter/(?P<author_name>\w+)/(?P<plotterparameter_name>[-\w]+)/(?P<version>\d+)/new/$",
views.create_new_version,
name="new-version",
),
url(
re_path(
r"^plotterparameter/(?P<author_name>\w+)/(?P<plotterparameter_name>[-\w]+)/(?P<version>\d+)/fork/$",
views.fork,
name="fork",
),
url(
re_path(
r"^plotterparameter/diff/(?P<author1>\w+)/(?P<name1>[-\w]+)/(?P<version1>\d+)/(?P<author2>\w+)/(?P<name2>[-\w]+)/(?P<version2>\d+)/$",
views.diff,
name="diff",
),
url(
re_path(
r"^(?P<author_name>\w+)/plotterparameter/$",
views.list_plotterparameters,
name="plotterparameter-list",
),
url(
r"^plotterparameter/$",
path(
"plotterparameter/",
views.list_plotterparameters_public,
name="plotterparameter-public-list",
),
url(
re_path(
r"^plotterparameter/(?P<author_name>\w+)/(?P<plotterparameter_name>[-\w]+)/(?P<version>\d+)/$",
views.plotterparameter_for_author,
name="plotterparameter-author-view",
),
url(
re_path(
r"^(?P<author>\w+)/(?P<name>[-\w]+)/(?P<version>\d+)/$",
views.view,
name="view",
),
url(
re_path(
r"^plotterparameter/(?P<author>\w+)/(?P<name>[-\w]+)/$",
views.plotterparameter_latest,
name="plotterparameter-view-latest",
),
url(
re_path(
r"^(?P<author>\w+)/(?P<name>[-\w]+)/$", views.view, name="plotter-view-latest",
),
]
......@@ -25,22 +25,25 @@
# #
###############################################################################
from django.conf.urls import url
from django.urls import path
from django.urls import re_path
from . import views
app_name = "reports"
partial_patterns = [
url(r"^(?P<template_name>[a-zA-Z_]+\.html)$", views.PartialGroupView.as_view(),),
re_path(
r"^(?P<template_name>[a-zA-Z_]+\.html)$", views.PartialGroupView.as_view(),
),
]
urlpatterns = [
url(r"^$", views.public_ls, name="public-list",),
url(r"^(?P<number>\d+)/$", views.by_number, name="view",),
url(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
url(
path("", views.public_ls, name="public-list",),
path("<int:number>/", views.by_number, name="view",),
re_path(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
re_path(
r"^(?P<author_name>\w+)/(?P<report_name>[-\w]+)/$",
views.for_author,
name="author-view",
......
......@@ -25,18 +25,21 @@
# #
###############################################################################
from django.conf.urls import url
from django.urls import path
from django.urls import re_path
from . import views
app_name = "search"
urlpatterns = [
url(r"^$", views.public_ls, name="public-list",),
url(r"^run/$", views.search, name="search",),
url(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
url(r"^(?P<author_name>\w+)/(?P<query_name>[\w\-]+)/$", views.view, name="view",),
url(
path(r"", views.public_ls, name="public-list",),
path(r"run/", views.search, name="search",),
re_path(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
re_path(
r"^(?P<author_name>\w+)/(?P<query_name>[\w\-]+)/$", views.view, name="view",
),
re_path(
r"^(?P<author_name>\w+)/(?P<query_name>[\w\-]+)/notify/$",
views.notify,
name="notify",
......
......@@ -25,12 +25,12 @@
# #
###############################################################################
from django.conf.urls import url
from django.urls import path
from . import views
app_name = "statistics"
urlpatterns = [
url(r"^$", views.statistics, name="summary",),
path(r"", views.statistics, name="summary",),
]
......@@ -25,16 +25,19 @@
# #
###############################################################################
from django.conf.urls import url
from django.urls import path
from django.urls import re_path
from . import views
app_name = "teams"
urlpatterns = [
url(r"^new/$", views.create, name="new",),
url(r"^$", views.public_ls, name="public-list",),
url(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
url(r"^(?P<author_name>\w+)/(?P<name>[-\w\s]+)/$", views.view, name="view",),
url(r"^edit/(?P<author_name>\w+)/(?P<name>[-\w\s]+)/$", views.edit, name="edit",),
path("new/", views.create, name="new",),
path(r"", views.public_ls, name="public-list",),
re_path(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
re_path(r"^(?P<author_name>\w+)/(?P<name>[-\w\s]+)/$", views.view, name="view",),
re_path(
r"^edit/(?P<author_name>\w+)/(?P<name>[-\w\s]+)/$", views.edit, name="edit",
),
]
......@@ -25,36 +25,37 @@
# #
###############################################################################
from django.conf.urls import url
from django.urls import path
from django.urls import re_path
from . import views
app_name = "toolchains"
urlpatterns = [
url(r"^new/$", views.create, name="new",),
url(r"^new/(?P<name>[-\w]+)/$", views.create, name="new-version",),
url(r"^$", views.public_ls, name="public-list",),
url(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
url(
path("new", views.create, name="new",),
re_path(r"^new/(?P<name>[-\w]+)/$", views.create, name="new-version",),
path("", views.public_ls, name="public-list",),
re_path(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
re_path(
r"^fork/(?P<author>\w+)/(?P<name>[-\w]+)/(?P<version>\d+)/$",
views.fork,
name="fork",
),
url(
re_path(
r"^edit/(?P<author>\w+)/(?P<name>[-\w]+)/(?P<version>\d+)/$",
views.edit,
name="edit",
),
url(
re_path(
r"^diff/(?P<author1>\w+)/(?P<name1>[-\w]+)/(?P<version1>\d+)/(?P<author2>\w+)/(?P<name2>[-\w]+)/(?P<version2>\d+)/$",
views.diff,
name="diff",
),
url(
re_path(
r"^(?P<author>\w+)/(?P<name>[-\w]+)/(?P<version>\d+)/$",
views.view,
name="view",
),
url(r"^(?P<author>\w+)/(?P<name>[-\w]+)/$", views.view, name="view-latest",),
re_path(r"(?P<author>\w+)/(?P<name>[-\w]+)/$", views.view, name="view-latest",),
]
......@@ -26,8 +26,9 @@
###############################################################################
from django.conf import settings
from django.conf.urls import url
from django.contrib.auth import views as auth_views
from django.urls import path
from django.urls import re_path
from django.views.generic.base import TemplateView
from . import views
......@@ -38,30 +39,28 @@ from .registration.views import register
app_name = "ui"
urlpatterns = [
url(r"^$", views.index, name="index"),
url(r"^login/", views.LoginView.as_view(), name="login"),
url(r"^logout/", auth_views.LogoutView.as_view(next_page="index"), name="logout"),
url(
r"^blocked_user_reactivation/$",
path("", views.index, name="index"),
path("login/", views.LoginView.as_view(), name="login"),
path("logout/", auth_views.LogoutView.as_view(next_page="index"), name="logout"),
path(
"blocked_user_reactivation/",
views.blocked_user_reactivation,
name="blocked_user_reactivation",
),
url(
r"^events/(?P<author_name>\w+)/$", views.activity_stream, name="activity-stream"
),
url(r"^docreq/(?P<author_name>\w+)/$", views.docreq, name="docreq"),
path("events/<author_name>/", views.activity_stream, name="activity-stream"),
path("docreq/<author_name>/", views.docreq, name="docreq"),
# Activation keys get matched by \w+ instead of the more specific
# [a-fA-F0-9]{40} because a bad activation key should still get to the
# view; that way it can return a sensible "invalid key" message instead
# of a confusing 404.
url(
r"^signup/$",
path(
"signup/",
register,
dict(success_url="registration-complete"),
name="registration",
),
url(
r"^signup/complete/$",
path(
"signup/complete/",
TemplateView.as_view(
template_name=(
"registration/registration_pending.html"
......@@ -71,13 +70,11 @@ urlpatterns = [
),
name="registration-complete",
),
url(
r"^signup/activate/(?P<activation_key>\w+)/$",
activate,
name="registration-activation",
path(
"signup/activate/<activation_key>/", activate, name="registration-activation",
),
url(
r"^preregister/$",
path(
"preregister/",
register,
dict(
success_url="pre-registration-complete",
......@@ -86,36 +83,36 @@ urlpatterns = [
),
name="pre-registration",
),
url(
r"^preregistration/complete/$",
path(
"preregistration/complete/",
TemplateView.as_view(
template_name="registration/preregistration_complete.html"
),
name="pre-registration-complete",
),
url(
r"^password_reset/$",
path(
"password_reset/",
auth_views.PasswordResetView.as_view(
template_name="registration/password-reset-form.html"
),
name="password_reset",
),
url(
r"^password_reset/done/$",
path(
"password_reset/done/",
auth_views.PasswordResetDoneView.as_view(
template_name="registration/password-reset-done.html"
),
name="password_reset_done",
),
url(
re_path(
r"^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$",
auth_views.PasswordResetConfirmView.as_view(
template_name="registration/password-reset-confirm.html"
),
name="password_reset_confirm",
),
url(
r"^reset/done/$",
path(
"reset/done/",
auth_views.PasswordResetCompleteView.as_view(
template_name="registration/password-reset-complete.html"
),
......
......@@ -27,10 +27,10 @@
from django.conf import settings
from django.conf.urls import include
from django.conf.urls import url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.urls import include
from django.urls import path
from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from rest_framework import permissions
......@@ -59,57 +59,58 @@ unprefixed_patterns = ui_urls.urlpatterns
unprefixed_patterns += navigation_urls.urlpatterns
unprefixed_patterns += [
url(r"^algorithms/", include("beat.web.algorithms.urls"),),
url(r"^libraries/", include("beat.web.libraries.urls"),),
url(r"^attestations/", include("beat.web.attestations.urls"),),
url(r"^backend/", include("beat.web.backend.urls"),),
url(r"^dataformats/", include("beat.web.dataformats.urls"),),
url(r"^databases/", include("beat.web.databases.urls"),),
url(r"^experiments/", include("beat.web.experiments.urls"),),
url(r"^search/", include("beat.web.search.urls"),),
url(r"^statistics/", include("beat.web.statistics.urls"),),
url(r"^toolchains/", include("beat.web.toolchains.urls"),),
url(r"^teams/", include("beat.web.team.urls"),),
url(r"^plotters/", include("beat.web.plotters.urls"),),
url(r"^reports/", include("beat.web.reports.urls"),),
url(r"^accounts/", include("beat.web.accounts.urls"),),
url(r"^admin/", admin.site.urls),
url(
r"^swagger(?P<format>\.json|\.yaml)$",
path("algorithms/", include("beat.web.algorithms.urls"),),
path("libraries/", include("beat.web.libraries.urls"),),
path("attestations/", include("beat.web.attestations.urls"),),
path("backend/", include("beat.web.backend.urls"),),
path("dataformats/", include("beat.web.dataformats.urls"),),
path("databases/", include("beat.web.databases.urls"),),
path("experiments/", include("beat.web.experiments.urls"),),
path("search/", include("beat.web.search.urls"),),
path("statistics/", include("beat.web.statistics.urls"),),
path("toolchains/", include("beat.web.toolchains.urls"),),
path("teams/", include("beat.web.team.urls"),),
path("plotters/", include("beat.web.plotters.urls"),),
path("reports/", include("beat.web.reports.urls"),),
path("accounts/", include("beat.web.accounts.urls"),),
path("admin/", admin.site.urls),
path(
r"swagger(<format>\.json|\.yaml)",
schema_view.without_ui(cache_timeout=0),
name="schema-json",
),
url(
r"^swagger/$",
path(
"swagger/",
schema_view.with_ui("swagger", cache_timeout=0),
name="schema-swagger-ui",
),
url(r"^activity/", include("actstream.urls"),),
path("activity/", include("actstream.urls"),),
]
# API
unprefixed_patterns += [
url(r"^api/v1/teams/", include("beat.web.team.api_urls"),),
url(r"^api/v1/algorithms/", include("beat.web.algorithms.api_urls"),),
url(r"^api/v1/attestations/", include("beat.web.attestations.api_urls"),),
url(r"^api/v1/backend/", include("beat.web.backend.api_urls"),),
url(r"^api/v1/databases/", include("beat.web.databases.api_urls"),),
url(r"^api/v1/dataformats/", include("beat.web.dataformats.api_urls"),),
url(r"^api/v1/experiments/", include("beat.web.experiments.api_urls"),),
url(r"^api/v1/libraries/", include("beat.web.libraries.api_urls"),),
url(r"^api/v1/search/", include("beat.web.search.api_urls"),),
url(r"^api/v1/toolchains/", include("beat.web.toolchains.api_urls"),),
url(r"^api/v1/plotters/", include("beat.web.plotters.api_urls"),),
url(r"^api/v1/reports/", include("beat.web.reports.api_urls"),),
url(r"^api/v1/accounts/", include("beat.web.accounts.api_urls"),),
api_patterns = [
path("algorithms/", include("beat.web.algorithms.api_urls"),),
path("attestations/", include("beat.web.attestations.api_urls"),),
path("backend/", include("beat.web.backend.api_urls"),),
path("teams/", include("beat.web.team.api_urls"),),
path("databases/", include("beat.web.databases.api_urls"),),
path("dataformats/", include("beat.web.dataformats.api_urls"),),
path("experiments/", include("beat.web.experiments.api_urls"),),
path("libraries/", include("beat.web.libraries.api_urls"),),
path("search/", include("beat.web.search.api_urls"),),
path("toolchains/", include("beat.web.toolchains.api_urls"),),
path("plotters/", include("beat.web.plotters.api_urls"),),
path("reports/", include("beat.web.reports.api_urls"),),
path("accounts/", include("beat.web.accounts.api_urls"),),
]
unprefixed_patterns += [path("api/v1/", include(api_patterns))]
# Process an eventual prefix in the URLs
if settings.URL_PREFIX not in ["", "/"]:
urlpatterns = [
url(r"^%s/" % settings.URL_PREFIX[1:], include(unprefixed_patterns)),
path("%s/" % settings.URL_PREFIX[1:], include(unprefixed_patterns)),
]
else:
urlpatterns = unprefixed_patterns
......
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