mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
*: Use django.urls.re_path() instead of its alias url()
- In Django 2.2 django.conf.urls.url() is an alias to django.urls.re_path(). - In Django 4.0, url() function will be removed. On Django 3.2, it throws a warning that this function will be removed in future. Tests: - Run unit tests with Django 3.2 and Django 2.2. - With Django 3.2 there are no warnings when running unit tests and when running FreedomBox Service. - Visit a few affected apps with both Django versions. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
a3e21adc8b
commit
cd2b2f5f2c
@ -13,12 +13,12 @@ write the following:
|
||||
.. code-block:: python3
|
||||
:caption: ``urls.py``
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import TransmissionAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/transmission/$', TransmissionAppView.as_view(), name='index'),
|
||||
re_path(r'^apps/transmission/$', TransmissionAppView.as_view(), name='index'),
|
||||
]
|
||||
|
||||
This routes the ``/apps/transmission/`` URL to a view called
|
||||
|
||||
@ -109,8 +109,8 @@ def _include_module_urls(module_import_path, module_name):
|
||||
url_module = module_import_path + '.urls'
|
||||
try:
|
||||
urls.urlpatterns += [
|
||||
django.conf.urls.url(
|
||||
r'', django.conf.urls.include((url_module, module_name)))
|
||||
django.urls.re_path(r'',
|
||||
django.urls.include((url_module, module_name)))
|
||||
]
|
||||
except ImportError:
|
||||
logger.debug('No URLs for %s', module_name)
|
||||
|
||||
@ -3,12 +3,13 @@
|
||||
URLs for the plinth api for android app.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
from stronghold.decorators import public
|
||||
|
||||
from plinth.modules.api import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^api/(?P<version>[0-9]+)/shortcuts/?$', public(views.shortcuts)),
|
||||
url(r'^api/(?P<version>[0-9]+)/access-info/?$', public(views.access_info)),
|
||||
re_path(r'^api/(?P<version>[0-9]+)/shortcuts/?$', public(views.shortcuts)),
|
||||
re_path(r'^api/(?P<version>[0-9]+)/access-info/?$',
|
||||
public(views.access_info)),
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the service discovery module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.views import AppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/avahi/$', AppView.as_view(app_id='avahi'), name='index'),
|
||||
re_path(r'^sys/avahi/$', AppView.as_view(app_id='avahi'), name='index'),
|
||||
]
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
URLs for the backups module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import (AddRemoteRepositoryView, AddRepositoryView,
|
||||
CreateArchiveView, DeleteArchiveView, DownloadArchiveView,
|
||||
@ -12,29 +12,31 @@ from .views import (AddRemoteRepositoryView, AddRepositoryView,
|
||||
VerifySshHostkeyView, mount_repository, umount_repository)
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/backups/$', IndexView.as_view(), name='index'),
|
||||
url(r'^sys/backups/(?P<uuid>[^/]+)/schedule/$', ScheduleView.as_view(),
|
||||
name='schedule'),
|
||||
url(r'^sys/backups/create/$', CreateArchiveView.as_view(), name='create'),
|
||||
url(r'^sys/backups/(?P<uuid>[^/]+)/download/(?P<name>[^/]+)/$',
|
||||
DownloadArchiveView.as_view(), name='download'),
|
||||
url(r'^sys/backups/(?P<uuid>[^/]+)/delete/(?P<name>[^/]+)/$',
|
||||
DeleteArchiveView.as_view(), name='delete'),
|
||||
url(r'^sys/backups/upload/$', UploadArchiveView.as_view(), name='upload'),
|
||||
url(r'^sys/backups/(?P<uuid>[^/]+)/restore-archive/(?P<name>[^/]+)/$',
|
||||
RestoreArchiveView.as_view(), name='restore-archive'),
|
||||
url(r'^sys/backups/restore-from-upload/$', RestoreFromUploadView.as_view(),
|
||||
name='restore-from-upload'),
|
||||
url(r'^sys/backups/repositories/add/$', AddRepositoryView.as_view(),
|
||||
name='add-repository'),
|
||||
url(r'^sys/backups/repositories/add-remote/$',
|
||||
AddRemoteRepositoryView.as_view(), name='add-remote-repository'),
|
||||
url(r'^sys/backups/repositories/(?P<uuid>[^/]+)/ssh-verify/$',
|
||||
VerifySshHostkeyView.as_view(), name='verify-ssh-hostkey'),
|
||||
url(r'^sys/backups/repositories/(?P<uuid>[^/]+)/delete/$',
|
||||
RemoveRepositoryView.as_view(), name='repository-remove'),
|
||||
url(r'^sys/backups/repositories/(?P<uuid>[^/]+)/mount/$', mount_repository,
|
||||
name='repository-mount'),
|
||||
url(r'^sys/backups/repositories/(?P<uuid>[^/]+)/umount/$',
|
||||
umount_repository, name='repository-umount'),
|
||||
re_path(r'^sys/backups/$', IndexView.as_view(), name='index'),
|
||||
re_path(r'^sys/backups/(?P<uuid>[^/]+)/schedule/$', ScheduleView.as_view(),
|
||||
name='schedule'),
|
||||
re_path(r'^sys/backups/create/$', CreateArchiveView.as_view(),
|
||||
name='create'),
|
||||
re_path(r'^sys/backups/(?P<uuid>[^/]+)/download/(?P<name>[^/]+)/$',
|
||||
DownloadArchiveView.as_view(), name='download'),
|
||||
re_path(r'^sys/backups/(?P<uuid>[^/]+)/delete/(?P<name>[^/]+)/$',
|
||||
DeleteArchiveView.as_view(), name='delete'),
|
||||
re_path(r'^sys/backups/upload/$', UploadArchiveView.as_view(),
|
||||
name='upload'),
|
||||
re_path(r'^sys/backups/(?P<uuid>[^/]+)/restore-archive/(?P<name>[^/]+)/$',
|
||||
RestoreArchiveView.as_view(), name='restore-archive'),
|
||||
re_path(r'^sys/backups/restore-from-upload/$',
|
||||
RestoreFromUploadView.as_view(), name='restore-from-upload'),
|
||||
re_path(r'^sys/backups/repositories/add/$', AddRepositoryView.as_view(),
|
||||
name='add-repository'),
|
||||
re_path(r'^sys/backups/repositories/add-remote/$',
|
||||
AddRemoteRepositoryView.as_view(), name='add-remote-repository'),
|
||||
re_path(r'^sys/backups/repositories/(?P<uuid>[^/]+)/ssh-verify/$',
|
||||
VerifySshHostkeyView.as_view(), name='verify-ssh-hostkey'),
|
||||
re_path(r'^sys/backups/repositories/(?P<uuid>[^/]+)/delete/$',
|
||||
RemoveRepositoryView.as_view(), name='repository-remove'),
|
||||
re_path(r'^sys/backups/repositories/(?P<uuid>[^/]+)/mount/$',
|
||||
mount_repository, name='repository-mount'),
|
||||
re_path(r'^sys/backups/repositories/(?P<uuid>[^/]+)/umount/$',
|
||||
umount_repository, name='repository-umount'),
|
||||
]
|
||||
|
||||
@ -3,13 +3,13 @@
|
||||
URLs for the bepasty module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import AddPasswordView, BepastyView, remove
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/bepasty/$', BepastyView.as_view(), name='index'),
|
||||
url(r'^apps/bepasty/add/$', AddPasswordView.as_view(), name='add'),
|
||||
url(r'^apps/bepasty/(?P<password>[A-Za-z0-9]+)/remove/$', remove,
|
||||
name='remove'),
|
||||
re_path(r'^apps/bepasty/$', BepastyView.as_view(), name='index'),
|
||||
re_path(r'^apps/bepasty/add/$', AddPasswordView.as_view(), name='add'),
|
||||
re_path(r'^apps/bepasty/(?P<password>[A-Za-z0-9]+)/remove/$', remove,
|
||||
name='remove'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the BIND module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.modules.bind.views import BindAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/bind/$', BindAppView.as_view(), name='index'),
|
||||
re_path(r'^sys/bind/$', BindAppView.as_view(), name='index'),
|
||||
]
|
||||
|
||||
@ -3,14 +3,14 @@
|
||||
URLs for the calibre module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/calibre/$', views.CalibreAppView.as_view(), name='index'),
|
||||
url(r'^apps/calibre/library/create/$', views.CreateLibraryView.as_view(),
|
||||
name='create-library'),
|
||||
url(r'^apps/calibre/library/(?P<name>[a-zA-Z0-9_.-]+)/delete/$',
|
||||
views.delete_library, name='delete-library'),
|
||||
re_path(r'^apps/calibre/$', views.CalibreAppView.as_view(), name='index'),
|
||||
re_path(r'^apps/calibre/library/create/$',
|
||||
views.CreateLibraryView.as_view(), name='create-library'),
|
||||
re_path(r'^apps/calibre/library/(?P<name>[a-zA-Z0-9_.-]+)/delete/$',
|
||||
views.delete_library, name='delete-library'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for Cockpit module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.modules.cockpit.views import CockpitAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/cockpit/$', CockpitAppView.as_view(), name='index'),
|
||||
re_path(r'^sys/cockpit/$', CockpitAppView.as_view(), name='index'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the Configuration module
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/config/$', views.ConfigAppView.as_view(), name='index'),
|
||||
re_path(r'^sys/config/$', views.ConfigAppView.as_view(), name='index'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the Coturn module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import CoturnAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/coturn/$', CoturnAppView.as_view(), name='index'),
|
||||
re_path(r'^apps/coturn/$', CoturnAppView.as_view(), name='index'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the date and time module
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import DateTimeAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/datetime/$', DateTimeAppView.as_view(), name='index'),
|
||||
re_path(r'^sys/datetime/$', DateTimeAppView.as_view(), name='index'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the Deluge module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import DelugeAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/deluge/$', DelugeAppView.as_view(), name='index')
|
||||
re_path(r'^apps/deluge/$', DelugeAppView.as_view(), name='index')
|
||||
]
|
||||
|
||||
@ -3,12 +3,12 @@
|
||||
URLs for the Diagnostics module
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/diagnostics/$', views.index, name='index'),
|
||||
url(r'^sys/diagnostics/(?P<app_id>[1-9a-z\-_]+)/$', views.diagnose_app,
|
||||
name='app'),
|
||||
re_path(r'^sys/diagnostics/$', views.index, name='index'),
|
||||
re_path(r'^sys/diagnostics/(?P<app_id>[1-9a-z\-_]+)/$', views.diagnose_app,
|
||||
name='app'),
|
||||
]
|
||||
|
||||
@ -3,11 +3,12 @@
|
||||
URLs for the diaspora module
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import DiasporaAppView, DiasporaSetupView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/diaspora/setup$', DiasporaSetupView.as_view(), name='setup'),
|
||||
url(r'^apps/diaspora/$', DiasporaAppView.as_view(), name='index')
|
||||
re_path(r'^apps/diaspora/setup$', DiasporaSetupView.as_view(),
|
||||
name='setup'),
|
||||
re_path(r'^apps/diaspora/$', DiasporaAppView.as_view(), name='index')
|
||||
]
|
||||
|
||||
@ -3,12 +3,13 @@
|
||||
URLs for the dynamicdns module
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/dynamicdns/$', views.index, name='index'),
|
||||
url(r'^sys/dynamicdns/configure/$', views.configure, name='configure'),
|
||||
url(r'^sys/dynamicdns/statuspage/$', views.statuspage, name='statuspage'),
|
||||
re_path(r'^sys/dynamicdns/$', views.index, name='index'),
|
||||
re_path(r'^sys/dynamicdns/configure/$', views.configure, name='configure'),
|
||||
re_path(r'^sys/dynamicdns/statuspage/$', views.statuspage,
|
||||
name='statuspage'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URL for the Ejabberd module
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import EjabberdAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/ejabberd/$', EjabberdAppView.as_view(), name='index')
|
||||
re_path(r'^apps/ejabberd/$', EjabberdAppView.as_view(), name='index')
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the Firewall module
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/firewall/$', views.FirewallAppView.as_view(), name='index'),
|
||||
re_path(r'^sys/firewall/$', views.FirewallAppView.as_view(), name='index'),
|
||||
]
|
||||
|
||||
@ -3,15 +3,15 @@
|
||||
URLs for the First Boot module
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
from stronghold.decorators import public
|
||||
|
||||
from .views import CompleteView, WelcomeView
|
||||
|
||||
urlpatterns = [
|
||||
# Take care of the firstboot middleware when changing URLs
|
||||
url(r'^firstboot/$', public(WelcomeView.as_view()), name='index'),
|
||||
url(r'^firstboot/welcome/$', public(WelcomeView.as_view()),
|
||||
name='welcome'),
|
||||
url(r'^firstboot/complete/$', CompleteView.as_view(), name='complete'),
|
||||
re_path(r'^firstboot/$', public(WelcomeView.as_view()), name='index'),
|
||||
re_path(r'^firstboot/welcome/$', public(WelcomeView.as_view()),
|
||||
name='welcome'),
|
||||
re_path(r'^firstboot/complete/$', CompleteView.as_view(), name='complete'),
|
||||
]
|
||||
|
||||
@ -3,19 +3,19 @@
|
||||
URLs for the Gitweb module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import CreateRepoView, EditRepoView, GitwebAppView, delete
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/gitweb/$', GitwebAppView.as_view(), name='index'),
|
||||
url(r'^apps/gitweb/create/$', CreateRepoView.as_view(), name='create'),
|
||||
url(
|
||||
re_path(r'^apps/gitweb/$', GitwebAppView.as_view(), name='index'),
|
||||
re_path(r'^apps/gitweb/create/$', CreateRepoView.as_view(), name='create'),
|
||||
re_path(
|
||||
r'^apps/gitweb/(?P<name>[a-zA-Z0-9-._]+)/edit/$',
|
||||
EditRepoView.as_view(),
|
||||
name='edit',
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r'^apps/gitweb/(?P<name>[a-zA-Z0-9-._]+)/delete/$',
|
||||
delete,
|
||||
name='delete',
|
||||
|
||||
@ -3,26 +3,27 @@
|
||||
URLs for the Help module
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.utils import non_admin_view
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^help/$', non_admin_view(views.index), name='index'),
|
||||
url(r'^help/about/$', non_admin_view(views.about), name='about'),
|
||||
url(r'^help/feedback/$', non_admin_view(views.feedback), name='feedback'),
|
||||
url(r'^help/support/$', non_admin_view(views.support), name='support'),
|
||||
url(r'^help/contribute/$', non_admin_view(views.contribute),
|
||||
name='contribute'),
|
||||
url(r'^help/manual/$', non_admin_view(views.manual), name='manual'),
|
||||
url(r'^help/manual/(?P<lang>\w*(-\w*)?)/$', non_admin_view(views.manual),
|
||||
name='manual'),
|
||||
url(r'^help/manual/(?P<lang>\w*(-\w*)?)/(?P<page>[\w-]+)$',
|
||||
non_admin_view(views.manual), name='manual-page'),
|
||||
url(r'^help/manual-download/$', non_admin_view(views.download_manual),
|
||||
name='download-manual'),
|
||||
url(r'^help/status-log/$', non_admin_view(views.status_log),
|
||||
name='status-log'),
|
||||
re_path(r'^help/$', non_admin_view(views.index), name='index'),
|
||||
re_path(r'^help/about/$', non_admin_view(views.about), name='about'),
|
||||
re_path(r'^help/feedback/$', non_admin_view(views.feedback),
|
||||
name='feedback'),
|
||||
re_path(r'^help/support/$', non_admin_view(views.support), name='support'),
|
||||
re_path(r'^help/contribute/$', non_admin_view(views.contribute),
|
||||
name='contribute'),
|
||||
re_path(r'^help/manual/$', non_admin_view(views.manual), name='manual'),
|
||||
re_path(r'^help/manual/(?P<lang>\w*(-\w*)?)/$',
|
||||
non_admin_view(views.manual), name='manual'),
|
||||
re_path(r'^help/manual/(?P<lang>\w*(-\w*)?)/(?P<page>[\w-]+)$',
|
||||
non_admin_view(views.manual), name='manual-page'),
|
||||
re_path(r'^help/manual-download/$', non_admin_view(views.download_manual),
|
||||
name='download-manual'),
|
||||
re_path(r'^help/status-log/$', non_admin_view(views.status_log),
|
||||
name='status-log'),
|
||||
]
|
||||
|
||||
@ -3,8 +3,10 @@
|
||||
URLs for the I2P module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.modules.i2p import views
|
||||
|
||||
urlpatterns = [url(r'^apps/i2p/$', views.I2PAppView.as_view(), name='index')]
|
||||
urlpatterns = [
|
||||
re_path(r'^apps/i2p/$', views.I2PAppView.as_view(), name='index')
|
||||
]
|
||||
|
||||
@ -3,12 +3,13 @@
|
||||
URLs for the ikiwiki module
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/ikiwiki/$', views.IkiwikiAppView.as_view(), name='index'),
|
||||
url(r'^apps/ikiwiki/(?P<name>.+)/delete/$', views.delete, name='delete'),
|
||||
url(r'^apps/ikiwiki/create/$', views.create, name='create'),
|
||||
re_path(r'^apps/ikiwiki/$', views.IkiwikiAppView.as_view(), name='index'),
|
||||
re_path(r'^apps/ikiwiki/(?P<name>.+)/delete/$', views.delete,
|
||||
name='delete'),
|
||||
re_path(r'^apps/ikiwiki/create/$', views.create, name='create'),
|
||||
]
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
URLs for the infinoted module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.views import AppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/infinoted/$', AppView.as_view(app_id='infinoted'),
|
||||
name='index'),
|
||||
re_path(r'^apps/infinoted/$', AppView.as_view(app_id='infinoted'),
|
||||
name='index'),
|
||||
]
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
URLs for the JSXC module
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
from stronghold.decorators import public
|
||||
|
||||
from plinth.views import AppView
|
||||
@ -11,6 +11,6 @@ from plinth.views import AppView
|
||||
from .views import JsxcView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/jsxc/$', AppView.as_view(app_id='jsxc'), name='index'),
|
||||
url(r'^apps/jsxc/jsxc/$', public(JsxcView.as_view()), name='jsxc')
|
||||
re_path(r'^apps/jsxc/$', AppView.as_view(app_id='jsxc'), name='index'),
|
||||
re_path(r'^apps/jsxc/jsxc/$', public(JsxcView.as_view()), name='jsxc')
|
||||
]
|
||||
|
||||
@ -3,18 +3,18 @@
|
||||
URLs for the Let's Encrypt module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/letsencrypt/$', views.index, name='index'),
|
||||
url(r'^sys/letsencrypt/obtain/(?P<domain>[^/]+)/$', views.obtain,
|
||||
name='obtain'),
|
||||
url(r'^sys/letsencrypt/re-obtain/(?P<domain>[^/]+)/$', views.reobtain,
|
||||
name='re-obtain'),
|
||||
url(r'^sys/letsencrypt/revoke/(?P<domain>[^/]+)/$', views.revoke,
|
||||
name='revoke'),
|
||||
url(r'^sys/letsencrypt/delete/(?P<domain>[^/]+)/$', views.delete,
|
||||
name='delete'),
|
||||
re_path(r'^sys/letsencrypt/$', views.index, name='index'),
|
||||
re_path(r'^sys/letsencrypt/obtain/(?P<domain>[^/]+)/$', views.obtain,
|
||||
name='obtain'),
|
||||
re_path(r'^sys/letsencrypt/re-obtain/(?P<domain>[^/]+)/$', views.reobtain,
|
||||
name='re-obtain'),
|
||||
re_path(r'^sys/letsencrypt/revoke/(?P<domain>[^/]+)/$', views.revoke,
|
||||
name='revoke'),
|
||||
re_path(r'^sys/letsencrypt/delete/(?P<domain>[^/]+)/$', views.delete,
|
||||
name='delete'),
|
||||
]
|
||||
|
||||
@ -3,12 +3,12 @@
|
||||
URLs for the matrix-synapse module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import MatrixSynapseAppView, SetupView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/matrixsynapse/setup/$', SetupView.as_view(), name='setup'),
|
||||
url(r'^apps/matrixsynapse/$', MatrixSynapseAppView.as_view(),
|
||||
name='index'),
|
||||
re_path(r'^apps/matrixsynapse/setup/$', SetupView.as_view(), name='setup'),
|
||||
re_path(r'^apps/matrixsynapse/$', MatrixSynapseAppView.as_view(),
|
||||
name='index'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the mediawiki module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import MediaWikiAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/mediawiki/$', MediaWikiAppView.as_view(), name='index'),
|
||||
re_path(r'^apps/mediawiki/$', MediaWikiAppView.as_view(), name='index'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the minetest module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.modules.minetest.views import MinetestAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/minetest/$', MinetestAppView.as_view(), name='index'),
|
||||
re_path(r'^apps/minetest/$', MinetestAppView.as_view(), name='index'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the minidlna Server module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.modules.minidlna.views import MiniDLNAAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/minidlna/$', MiniDLNAAppView.as_view(), name='index'),
|
||||
re_path(r'^apps/minidlna/$', MiniDLNAAppView.as_view(), name='index'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,11 @@
|
||||
URLs for the mldonkey module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.views import AppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/mldonkey/$', AppView.as_view(app_id='mldonkey'), name='index')
|
||||
re_path(r'^apps/mldonkey/$', AppView.as_view(app_id='mldonkey'),
|
||||
name='index')
|
||||
]
|
||||
|
||||
@ -3,17 +3,17 @@
|
||||
URLs for the monkeysphere module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/monkeysphere/$', views.index, name='index'),
|
||||
url(r'^sys/monkeysphere/(?P<ssh_fingerprint>[0-9A-Za-z:+/]+)/import/$',
|
||||
views.import_key, name='import'),
|
||||
url(r'^sys/monkeysphere/(?P<fingerprint>[0-9A-Fa-f]+)/details/$',
|
||||
views.details, name='details'),
|
||||
url(r'^sys/monkeysphere/(?P<fingerprint>[0-9A-Fa-f]+)/publish/$',
|
||||
views.publish, name='publish'),
|
||||
url(r'^sys/monkeysphere/cancel/$', views.cancel, name='cancel'),
|
||||
re_path(r'^sys/monkeysphere/$', views.index, name='index'),
|
||||
re_path(r'^sys/monkeysphere/(?P<ssh_fingerprint>[0-9A-Za-z:+/]+)/import/$',
|
||||
views.import_key, name='import'),
|
||||
re_path(r'^sys/monkeysphere/(?P<fingerprint>[0-9A-Fa-f]+)/details/$',
|
||||
views.details, name='details'),
|
||||
re_path(r'^sys/monkeysphere/(?P<fingerprint>[0-9A-Fa-f]+)/publish/$',
|
||||
views.publish, name='publish'),
|
||||
re_path(r'^sys/monkeysphere/cancel/$', views.cancel, name='cancel'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the Mumble module
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.modules.mumble.views import MumbleAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/mumble/$', MumbleAppView.as_view(), name='index'),
|
||||
re_path(r'^apps/mumble/$', MumbleAppView.as_view(), name='index'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the name services module
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/names/$', views.index, name='index'),
|
||||
re_path(r'^sys/names/$', views.index, name='index'),
|
||||
]
|
||||
|
||||
@ -3,43 +3,47 @@
|
||||
URLs for the Network module
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/networks/$', views.index, name='index'),
|
||||
url(r'^sys/networks/(?P<uuid>[\w.@+-]+)/show/$', views.show, name='show'),
|
||||
url(r'^sys/networks/(?P<uuid>[\w.@+-]+)/edit/$', views.edit, name='edit'),
|
||||
url(r'^sys/networks/(?P<uuid>[\w.@+-]+)/activate/$', views.activate,
|
||||
name='activate'),
|
||||
url(r'^sys/networks/(?P<uuid>[\w.@+-]+)/deactivate/$', views.deactivate,
|
||||
name='deactivate'),
|
||||
url(r'^sys/networks/scan/$', views.scan, name='scan'),
|
||||
url(r'^sys/networks/add/$', views.add, name='add'),
|
||||
url(r'^sys/networks/add/generic/$', views.add_generic, name='add_generic'),
|
||||
url(r'^sys/networks/add/ethernet/$', views.add_ethernet,
|
||||
name='add_ethernet'),
|
||||
url(r'^sys/networks/add/pppoe/$', views.add_pppoe, name='add_pppoe'),
|
||||
url(
|
||||
re_path(r'^sys/networks/$', views.index, name='index'),
|
||||
re_path(r'^sys/networks/(?P<uuid>[\w.@+-]+)/show/$', views.show,
|
||||
name='show'),
|
||||
re_path(r'^sys/networks/(?P<uuid>[\w.@+-]+)/edit/$', views.edit,
|
||||
name='edit'),
|
||||
re_path(r'^sys/networks/(?P<uuid>[\w.@+-]+)/activate/$', views.activate,
|
||||
name='activate'),
|
||||
re_path(r'^sys/networks/(?P<uuid>[\w.@+-]+)/deactivate/$',
|
||||
views.deactivate, name='deactivate'),
|
||||
re_path(r'^sys/networks/scan/$', views.scan, name='scan'),
|
||||
re_path(r'^sys/networks/add/$', views.add, name='add'),
|
||||
re_path(r'^sys/networks/add/generic/$', views.add_generic,
|
||||
name='add_generic'),
|
||||
re_path(r'^sys/networks/add/ethernet/$', views.add_ethernet,
|
||||
name='add_ethernet'),
|
||||
re_path(r'^sys/networks/add/pppoe/$', views.add_pppoe, name='add_pppoe'),
|
||||
re_path(
|
||||
r'^sys/networks/add/wifi/(?:(?P<ssid>[^/]+)/'
|
||||
r'(?P<interface_name>[^/]+)/)?$', views.add_wifi, name='add_wifi'),
|
||||
url(r'^sys/networks/(?P<uuid>[\w.@+-]+)/delete/$', views.delete,
|
||||
name='delete'),
|
||||
url(r'^sys/networks/router-configuration/$',
|
||||
views.RouterConfigurationView.as_view(), name='router-configuration'),
|
||||
url(r'^sys/networks/firstboot/router-configuration/$',
|
||||
views.RouterConfigurationFirstBootView.as_view(),
|
||||
name='router-configuration-first-boot'),
|
||||
url(r'^sys/networks/internet-connection-type/$',
|
||||
views.InternetConnectionTypeView.as_view(),
|
||||
name='internet-connection-type'),
|
||||
url(r'^sys/networks/firstboot/internet-connection-type/$',
|
||||
views.InternetConnectionTypeFirstBootView.as_view(),
|
||||
name='internet-connection-type-first-boot'),
|
||||
url(r'^sys/networks/network-topology/$',
|
||||
views.NetworkTopologyView.as_view(), name='network-topology'),
|
||||
url(r'^sys/networks/firstboot/network-topology-first-boot/$',
|
||||
views.NetworkTopologyFirstBootView.as_view(),
|
||||
name='network-topology-first-boot'),
|
||||
re_path(r'^sys/networks/(?P<uuid>[\w.@+-]+)/delete/$', views.delete,
|
||||
name='delete'),
|
||||
re_path(r'^sys/networks/router-configuration/$',
|
||||
views.RouterConfigurationView.as_view(),
|
||||
name='router-configuration'),
|
||||
re_path(r'^sys/networks/firstboot/router-configuration/$',
|
||||
views.RouterConfigurationFirstBootView.as_view(),
|
||||
name='router-configuration-first-boot'),
|
||||
re_path(r'^sys/networks/internet-connection-type/$',
|
||||
views.InternetConnectionTypeView.as_view(),
|
||||
name='internet-connection-type'),
|
||||
re_path(r'^sys/networks/firstboot/internet-connection-type/$',
|
||||
views.InternetConnectionTypeFirstBootView.as_view(),
|
||||
name='internet-connection-type-first-boot'),
|
||||
re_path(r'^sys/networks/network-topology/$',
|
||||
views.NetworkTopologyView.as_view(), name='network-topology'),
|
||||
re_path(r'^sys/networks/firstboot/network-topology-first-boot/$',
|
||||
views.NetworkTopologyFirstBootView.as_view(),
|
||||
name='network-topology-first-boot'),
|
||||
]
|
||||
|
||||
@ -3,16 +3,16 @@
|
||||
URLs for the OpenVPN module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.utils import user_group_view
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/openvpn/$', views.OpenVPNAppView.as_view(), name='index'),
|
||||
url(r'^apps/openvpn/setup/$', views.setup, name='setup'),
|
||||
url(r'^apps/openvpn/ecc/$', views.ecc, name='ecc'),
|
||||
url(r'^apps/openvpn/profile/$', user_group_view(views.profile, 'vpn'),
|
||||
name='profile'),
|
||||
re_path(r'^apps/openvpn/$', views.OpenVPNAppView.as_view(), name='index'),
|
||||
re_path(r'^apps/openvpn/setup/$', views.setup, name='setup'),
|
||||
re_path(r'^apps/openvpn/ecc/$', views.ecc, name='ecc'),
|
||||
re_path(r'^apps/openvpn/profile/$', user_group_view(views.profile, 'vpn'),
|
||||
name='profile'),
|
||||
]
|
||||
|
||||
@ -3,14 +3,14 @@
|
||||
URLs for the PageKite module
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import AddCustomServiceView, ConfigurationView, DeleteServiceView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/pagekite/$', ConfigurationView.as_view(), name='index'),
|
||||
url(r'^sys/pagekite/services/custom/add/$', AddCustomServiceView.as_view(),
|
||||
name='add-custom-service'),
|
||||
url(r'^sys/pagekite/services/custom/delete/$', DeleteServiceView.as_view(),
|
||||
name='delete-custom-service'),
|
||||
re_path(r'^sys/pagekite/$', ConfigurationView.as_view(), name='index'),
|
||||
re_path(r'^sys/pagekite/services/custom/add/$',
|
||||
AddCustomServiceView.as_view(), name='add-custom-service'),
|
||||
re_path(r'^sys/pagekite/services/custom/delete/$',
|
||||
DeleteServiceView.as_view(), name='delete-custom-service'),
|
||||
]
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
FreedomBox app for System Monitoring (cockpit-pcp) in ‘System’.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.views import AppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/performance/$', AppView.as_view(app_id='performance'),
|
||||
name='index'),
|
||||
re_path(r'^sys/performance/$', AppView.as_view(app_id='performance'),
|
||||
name='index'),
|
||||
]
|
||||
|
||||
@ -3,12 +3,12 @@
|
||||
URLs for the power module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/power/$', views.index, name='index'),
|
||||
url(r'^sys/power/restart$', views.restart, name='restart'),
|
||||
url(r'^sys/power/shutdown$', views.shutdown, name='shutdown'),
|
||||
re_path(r'^sys/power/$', views.index, name='index'),
|
||||
re_path(r'^sys/power/restart$', views.restart, name='restart'),
|
||||
re_path(r'^sys/power/shutdown$', views.shutdown, name='shutdown'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,11 @@
|
||||
URLs for the Privoxy module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.views import AppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/privoxy/$', AppView.as_view(app_id='privoxy'), name='index'),
|
||||
re_path(r'^apps/privoxy/$', AppView.as_view(app_id='privoxy'),
|
||||
name='index'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the quassel module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import QuasselAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/quassel/$', QuasselAppView.as_view(), name='index'),
|
||||
re_path(r'^apps/quassel/$', QuasselAppView.as_view(), name='index'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the radicale module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import RadicaleAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/radicale/$', RadicaleAppView.as_view(), name='index'),
|
||||
re_path(r'^apps/radicale/$', RadicaleAppView.as_view(), name='index'),
|
||||
]
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
URLs for the Roundcube module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.views import AppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/roundcube/$', AppView.as_view(app_id='roundcube'),
|
||||
name='index')
|
||||
re_path(r'^apps/roundcube/$', AppView.as_view(app_id='roundcube'),
|
||||
name='index')
|
||||
]
|
||||
|
||||
@ -3,12 +3,12 @@
|
||||
URLs for the samba module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/samba/$', views.SambaAppView.as_view(), name='index'),
|
||||
url(r'^apps/samba/share/(?P<mount_point>[A-Za-z0-9%_.\-~]+)/$',
|
||||
views.share, name='share')
|
||||
re_path(r'^apps/samba/$', views.SambaAppView.as_view(), name='index'),
|
||||
re_path(r'^apps/samba/share/(?P<mount_point>[A-Za-z0-9%_.\-~]+)/$',
|
||||
views.share, name='share')
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the Searx module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import SearxAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/searx/$', SearxAppView.as_view(), name='index'),
|
||||
re_path(r'^apps/searx/$', SearxAppView.as_view(), name='index'),
|
||||
]
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
URLs for the security module
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/security/$', views.index, name='index'),
|
||||
url(r'^sys/security/report$', views.report, name='report'),
|
||||
re_path(r'^sys/security/$', views.index, name='index'),
|
||||
re_path(r'^sys/security/report$', views.report, name='report'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,11 @@
|
||||
URLs for the Shaarli module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.views import AppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/shaarli/$', AppView.as_view(app_id='shaarli'), name='index')
|
||||
re_path(r'^apps/shaarli/$', AppView.as_view(app_id='shaarli'),
|
||||
name='index')
|
||||
]
|
||||
|
||||
@ -3,10 +3,11 @@
|
||||
URLs for the Shadowsocks module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import ShadowsocksAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/shadowsocks/$', ShadowsocksAppView.as_view(), name='index'),
|
||||
re_path(r'^apps/shadowsocks/$', ShadowsocksAppView.as_view(),
|
||||
name='index'),
|
||||
]
|
||||
|
||||
@ -3,14 +3,15 @@
|
||||
URLs for the sharing app.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import AddShareView, EditShareView, IndexView, remove
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/sharing/$', IndexView.as_view(), name='index'),
|
||||
url(r'^apps/sharing/add/$', AddShareView.as_view(), name='add'),
|
||||
url(r'^apps/sharing/(?P<name>[a-z0-9]+)/edit/$', EditShareView.as_view(),
|
||||
name='edit'),
|
||||
url(r'^apps/sharing/(?P<name>[a-z0-9]+)/remove/$', remove, name='remove'),
|
||||
re_path(r'^apps/sharing/$', IndexView.as_view(), name='index'),
|
||||
re_path(r'^apps/sharing/add/$', AddShareView.as_view(), name='add'),
|
||||
re_path(r'^apps/sharing/(?P<name>[a-z0-9]+)/edit/$',
|
||||
EditShareView.as_view(), name='edit'),
|
||||
re_path(r'^apps/sharing/(?P<name>[a-z0-9]+)/remove/$', remove,
|
||||
name='remove'),
|
||||
]
|
||||
|
||||
@ -3,15 +3,15 @@
|
||||
URLs for the snapshot module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/snapshot/$', views.index, name='index'),
|
||||
url(r'^sys/snapshot/manage/$', views.manage, name='manage'),
|
||||
url(r'^sys/snapshot/selected/delete$', views.delete_selected,
|
||||
name='delete-selected'),
|
||||
url(r'^sys/snapshot/(?P<number>\d+)/rollback$', views.rollback,
|
||||
name='rollback'),
|
||||
re_path(r'^sys/snapshot/$', views.index, name='index'),
|
||||
re_path(r'^sys/snapshot/manage/$', views.manage, name='manage'),
|
||||
re_path(r'^sys/snapshot/selected/delete$', views.delete_selected,
|
||||
name='delete-selected'),
|
||||
re_path(r'^sys/snapshot/(?P<number>\d+)/rollback$', views.rollback,
|
||||
name='rollback'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the Secure Shell Server module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.modules.ssh.views import SshAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/ssh/$', SshAppView.as_view(), name='index'),
|
||||
re_path(r'^sys/ssh/$', SshAppView.as_view(), name='index'),
|
||||
]
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
URLs for the Single Sign On module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
from stronghold.decorators import public
|
||||
|
||||
from plinth.utils import non_admin_view
|
||||
@ -11,8 +11,8 @@ from plinth.utils import non_admin_view
|
||||
from .views import SSOLoginView, refresh
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^accounts/sso/login/$', public(SSOLoginView.as_view()),
|
||||
name='sso-login'),
|
||||
url(r'^accounts/sso/refresh/$', non_admin_view(refresh),
|
||||
name='sso-refresh'),
|
||||
re_path(r'^accounts/sso/login/$', public(SSOLoginView.as_view()),
|
||||
name='sso-login'),
|
||||
re_path(r'^accounts/sso/refresh/$', non_admin_view(refresh),
|
||||
name='sso-refresh'),
|
||||
]
|
||||
|
||||
@ -3,13 +3,13 @@
|
||||
URLs for the disks module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/storage/$', views.StorageAppView.as_view(), name='index'),
|
||||
url(r'^sys/storage/expand$', views.expand, name='expand'),
|
||||
url(r'^sys/storage/eject/(?P<device_path>[A-Za-z0-9%_.\-~]+)/$',
|
||||
views.eject, name='eject')
|
||||
re_path(r'^sys/storage/$', views.StorageAppView.as_view(), name='index'),
|
||||
re_path(r'^sys/storage/expand$', views.expand, name='expand'),
|
||||
re_path(r'^sys/storage/eject/(?P<device_path>[A-Za-z0-9%_.\-~]+)/$',
|
||||
views.eject, name='eject')
|
||||
]
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
URLs for the Syncthing module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.views import AppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/syncthing/$', AppView.as_view(app_id='syncthing'),
|
||||
name='index')
|
||||
re_path(r'^apps/syncthing/$', AppView.as_view(app_id='syncthing'),
|
||||
name='index')
|
||||
]
|
||||
|
||||
@ -3,16 +3,16 @@
|
||||
URLs for the Tahoe-LAFS module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
from .views import TahoeAppView, TahoeSetupView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/tahoe/setup/$', TahoeSetupView.as_view(), name='setup'),
|
||||
url(r'^apps/tahoe/add_introducer/$', views.add_introducer,
|
||||
name='add-introducer'),
|
||||
url(r'^apps/tahoe/remove_introducer/(?P<introducer>[0-9a-zA-Z_]+)/$',
|
||||
views.remove_introducer, name='remove-introducer'),
|
||||
url(r'^apps/tahoe/$', TahoeAppView.as_view(), name='index')
|
||||
re_path(r'^apps/tahoe/setup/$', TahoeSetupView.as_view(), name='setup'),
|
||||
re_path(r'^apps/tahoe/add_introducer/$', views.add_introducer,
|
||||
name='add-introducer'),
|
||||
re_path(r'^apps/tahoe/remove_introducer/(?P<introducer>[0-9a-zA-Z_]+)/$',
|
||||
views.remove_introducer, name='remove-introducer'),
|
||||
re_path(r'^apps/tahoe/$', TahoeAppView.as_view(), name='index')
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the Tor module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/tor/$', views.index, name='index'),
|
||||
re_path(r'^apps/tor/$', views.index, name='index'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,11 @@
|
||||
URLs for the Transmission module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import TransmissionAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/transmission/$', TransmissionAppView.as_view(), name='index'),
|
||||
re_path(r'^apps/transmission/$', TransmissionAppView.as_view(),
|
||||
name='index'),
|
||||
]
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
URLs for the Tiny Tiny RSS module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.views import AppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/ttrss/$', AppView.as_view(app_id='ttrss'), name='index')
|
||||
re_path(r'^apps/ttrss/$', AppView.as_view(app_id='ttrss'), name='index')
|
||||
]
|
||||
|
||||
@ -3,21 +3,22 @@
|
||||
URLs for the upgrades module
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/upgrades/$', views.UpgradesConfigurationView.as_view(),
|
||||
name='index'),
|
||||
url(r'^sys/upgrades/activate-backports/$', views.activate_backports,
|
||||
name='activate-backports'),
|
||||
url(r'^sys/upgrades/firstboot/backports/$',
|
||||
views.BackportsFirstbootView.as_view(), name='backports-firstboot'),
|
||||
url(r'^sys/upgrades/firstboot/update/$',
|
||||
views.UpdateFirstbootView.as_view(), name='update-firstboot'),
|
||||
url(r'^sys/upgrades/firstboot/update/progress/$',
|
||||
views.UpdateFirstbootProgressView.as_view(),
|
||||
name='update-firstboot-progress'),
|
||||
url(r'^sys/upgrades/upgrade/$', views.upgrade, name='upgrade'),
|
||||
re_path(r'^sys/upgrades/$', views.UpgradesConfigurationView.as_view(),
|
||||
name='index'),
|
||||
re_path(r'^sys/upgrades/activate-backports/$', views.activate_backports,
|
||||
name='activate-backports'),
|
||||
re_path(r'^sys/upgrades/firstboot/backports/$',
|
||||
views.BackportsFirstbootView.as_view(),
|
||||
name='backports-firstboot'),
|
||||
re_path(r'^sys/upgrades/firstboot/update/$',
|
||||
views.UpdateFirstbootView.as_view(), name='update-firstboot'),
|
||||
re_path(r'^sys/upgrades/firstboot/update/progress/$',
|
||||
views.UpdateFirstbootProgressView.as_view(),
|
||||
name='update-firstboot-progress'),
|
||||
re_path(r'^sys/upgrades/upgrade/$', views.upgrade, name='upgrade'),
|
||||
]
|
||||
|
||||
@ -4,8 +4,7 @@ URLs for the Users module
|
||||
"""
|
||||
|
||||
from axes.decorators import axes_dispatch
|
||||
from django.conf.urls import url
|
||||
from django.urls import reverse_lazy
|
||||
from django.urls import re_path, reverse_lazy
|
||||
from stronghold.decorators import public
|
||||
|
||||
from plinth.modules.sso.views import SSOLoginView, SSOLogoutView
|
||||
@ -14,24 +13,24 @@ from plinth.utils import non_admin_view
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/users/$', views.UserList.as_view(), name='index'),
|
||||
url(r'^sys/users/create/$', views.UserCreate.as_view(), name='create'),
|
||||
url(r'^sys/users/(?P<slug>[\w.@+-]+)/edit/$',
|
||||
non_admin_view(views.UserUpdate.as_view()), name='edit'),
|
||||
url(r'^sys/users/(?P<slug>[\w.@+-]+)/delete/$', views.UserDelete.as_view(),
|
||||
name='delete'),
|
||||
url(r'^sys/users/(?P<slug>[\w.@+-]+)/change_password/$',
|
||||
non_admin_view(views.UserChangePassword.as_view()),
|
||||
name='change_password'),
|
||||
re_path(r'^sys/users/$', views.UserList.as_view(), name='index'),
|
||||
re_path(r'^sys/users/create/$', views.UserCreate.as_view(), name='create'),
|
||||
re_path(r'^sys/users/(?P<slug>[\w.@+-]+)/edit/$',
|
||||
non_admin_view(views.UserUpdate.as_view()), name='edit'),
|
||||
re_path(r'^sys/users/(?P<slug>[\w.@+-]+)/delete/$',
|
||||
views.UserDelete.as_view(), name='delete'),
|
||||
re_path(r'^sys/users/(?P<slug>[\w.@+-]+)/change_password/$',
|
||||
non_admin_view(views.UserChangePassword.as_view()),
|
||||
name='change_password'),
|
||||
|
||||
# Authnz is handled by SSO
|
||||
|
||||
# XXX: Use axes authentication backend and middleware instead of
|
||||
# axes_dispatch after axes 5.x becomes available in Debian stable.
|
||||
url(r'^accounts/login/$', public(axes_dispatch(SSOLoginView.as_view())),
|
||||
name='login'),
|
||||
url(r'^accounts/logout/$', non_admin_view(SSOLogoutView.as_view()),
|
||||
{'next_page': reverse_lazy('index')}, name='logout'),
|
||||
url(r'^users/firstboot/$', public(views.FirstBootView.as_view()),
|
||||
name='firstboot'),
|
||||
re_path(r'^accounts/login/$',
|
||||
public(axes_dispatch(SSOLoginView.as_view())), name='login'),
|
||||
re_path(r'^accounts/logout/$', non_admin_view(SSOLogoutView.as_view()),
|
||||
{'next_page': reverse_lazy('index')}, name='logout'),
|
||||
re_path(r'^users/firstboot/$', public(views.FirstBootView.as_view()),
|
||||
name='firstboot'),
|
||||
]
|
||||
|
||||
@ -3,26 +3,26 @@
|
||||
URLs for the wireguard module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from plinth.modules.wireguard import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/wireguard/$', views.WireguardView.as_view(), name='index'),
|
||||
url(r'^apps/wireguard/client/add/$', views.AddClientView.as_view(),
|
||||
name='add-client'),
|
||||
url(r'^apps/wireguard/client/(?P<public_key>[^/]+)/show/$',
|
||||
views.ShowClientView.as_view(), name='show-client'),
|
||||
url(r'^apps/wireguard/client/(?P<public_key>[^/]+)/edit/$',
|
||||
views.EditClientView.as_view(), name='edit-client'),
|
||||
url(r'^apps/wireguard/client/(?P<public_key>[^/]+)/delete/$',
|
||||
views.DeleteClientView.as_view(), name='delete-client'),
|
||||
url(r'^apps/wireguard/server/add/$', views.AddServerView.as_view(),
|
||||
name='add-server'),
|
||||
url(r'^apps/wireguard/server/(?P<interface>wg[0-9]+)/show/$',
|
||||
views.ShowServerView.as_view(), name='show-server'),
|
||||
url(r'^apps/wireguard/server/(?P<interface>wg[0-9]+)/edit/$',
|
||||
views.EditServerView.as_view(), name='edit-server'),
|
||||
url(r'^apps/wireguard/server/(?P<interface>wg[0-9]+)/delete/$',
|
||||
views.DeleteServerView.as_view(), name='delete-server'),
|
||||
re_path(r'^apps/wireguard/$', views.WireguardView.as_view(), name='index'),
|
||||
re_path(r'^apps/wireguard/client/add/$', views.AddClientView.as_view(),
|
||||
name='add-client'),
|
||||
re_path(r'^apps/wireguard/client/(?P<public_key>[^/]+)/show/$',
|
||||
views.ShowClientView.as_view(), name='show-client'),
|
||||
re_path(r'^apps/wireguard/client/(?P<public_key>[^/]+)/edit/$',
|
||||
views.EditClientView.as_view(), name='edit-client'),
|
||||
re_path(r'^apps/wireguard/client/(?P<public_key>[^/]+)/delete/$',
|
||||
views.DeleteClientView.as_view(), name='delete-client'),
|
||||
re_path(r'^apps/wireguard/server/add/$', views.AddServerView.as_view(),
|
||||
name='add-server'),
|
||||
re_path(r'^apps/wireguard/server/(?P<interface>wg[0-9]+)/show/$',
|
||||
views.ShowServerView.as_view(), name='show-server'),
|
||||
re_path(r'^apps/wireguard/server/(?P<interface>wg[0-9]+)/edit/$',
|
||||
views.EditServerView.as_view(), name='edit-server'),
|
||||
re_path(r'^apps/wireguard/server/(?P<interface>wg[0-9]+)/delete/$',
|
||||
views.DeleteServerView.as_view(), name='delete-server'),
|
||||
]
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
URLs for the WordPress module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import WordPressAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/wordpress/$', WordPressAppView.as_view(app_id='wordpress'),
|
||||
name='index'),
|
||||
re_path(r'^apps/wordpress/$', WordPressAppView.as_view(app_id='wordpress'),
|
||||
name='index'),
|
||||
]
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
URLs for the Zoph module.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from .views import SetupView, ZophAppView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^apps/zoph/setup/$', SetupView.as_view(), name='setup'),
|
||||
url(r'^apps/zoph/$', ZophAppView.as_view(app_id='zoph'), name='index')
|
||||
re_path(r'^apps/zoph/setup/$', SetupView.as_view(), name='setup'),
|
||||
re_path(r'^apps/zoph/$', ZophAppView.as_view(app_id='zoph'), name='index')
|
||||
]
|
||||
|
||||
@ -3,13 +3,14 @@
|
||||
Django URL patterns for running tests.
|
||||
"""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
_test_view = TemplateView.as_view(template_name='index.html')
|
||||
urlpatterns = [
|
||||
url(r'^$', _test_view, name='index'),
|
||||
url(r'^apps/$', _test_view, name='apps'),
|
||||
url(r'^sys/$', _test_view, name='system'),
|
||||
url(r'^test/(?P<a>\d+)/(?P<b>\d+)/(?P<c>\d+)/$', _test_view, name='test'),
|
||||
re_path(r'^$', _test_view, name='index'),
|
||||
re_path(r'^apps/$', _test_view, name='apps'),
|
||||
re_path(r'^sys/$', _test_view, name='system'),
|
||||
re_path(r'^test/(?P<a>\d+)/(?P<b>\d+)/(?P<c>\d+)/$', _test_view,
|
||||
name='test'),
|
||||
]
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
Django URLconf file containing all urls
|
||||
"""
|
||||
from captcha import views as cviews
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
from stronghold.decorators import public
|
||||
|
||||
from plinth.modules.sso.views import CaptchaLoginView
|
||||
@ -11,27 +11,28 @@ from plinth.modules.sso.views import CaptchaLoginView
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', views.index, name='index'),
|
||||
url(r'^language-selection/$',
|
||||
public(views.LanguageSelectionView.as_view()),
|
||||
name='language-selection'),
|
||||
url(r'^apps/$', views.AppsIndexView.as_view(), name='apps'),
|
||||
url(r'^sys/$', views.system_index, name='system'),
|
||||
re_path(r'^$', views.index, name='index'),
|
||||
re_path(r'^language-selection/$',
|
||||
public(views.LanguageSelectionView.as_view()),
|
||||
name='language-selection'),
|
||||
re_path(r'^apps/$', views.AppsIndexView.as_view(), name='apps'),
|
||||
re_path(r'^sys/$', views.system_index, name='system'),
|
||||
|
||||
# captcha urls are public
|
||||
url(r'^captcha/image/(?P<key>\w+)/$', public(cviews.captcha_image),
|
||||
name='captcha-image', kwargs={'scale': 1}),
|
||||
url(r'^captcha/image/(?P<key>\w+)@2/$', public(cviews.captcha_image),
|
||||
name='captcha-image-2x', kwargs={'scale': 2}),
|
||||
url(r'^captcha/audio/(?P<key>\w+)/$', public(cviews.captcha_audio),
|
||||
name='captcha-audio'),
|
||||
url(r'^captcha/refresh/$', public(cviews.captcha_refresh),
|
||||
name='captcha-refresh'),
|
||||
re_path(r'^captcha/image/(?P<key>\w+)/$', public(cviews.captcha_image),
|
||||
name='captcha-image', kwargs={'scale': 1}),
|
||||
re_path(r'^captcha/image/(?P<key>\w+)@2/$', public(cviews.captcha_image),
|
||||
name='captcha-image-2x', kwargs={'scale': 2}),
|
||||
re_path(r'^captcha/audio/(?P<key>\w+)/$', public(cviews.captcha_audio),
|
||||
name='captcha-audio'),
|
||||
re_path(r'^captcha/refresh/$', public(cviews.captcha_refresh),
|
||||
name='captcha-refresh'),
|
||||
|
||||
# locked url from django-axes
|
||||
url(r'locked/$', public(CaptchaLoginView.as_view()), name='locked_out'),
|
||||
re_path(r'locked/$', public(CaptchaLoginView.as_view()),
|
||||
name='locked_out'),
|
||||
|
||||
# Notifications
|
||||
url(r'^notification/(?P<id>[A-Za-z0-9-=]+)/dismiss/$',
|
||||
views.notification_dismiss, name='notification_dismiss')
|
||||
re_path(r'^notification/(?P<id>[A-Za-z0-9-=]+)/dismiss/$',
|
||||
views.notification_dismiss, name='notification_dismiss')
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user