0003-django4-replaced-urls.url-with-url.re_path-equivalen.patch
passerelle/api/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import path, re_path
|
|
18 | 18 | |
19 | 19 |
from .views import JobDetailView, StatisticsListView |
20 | 20 | |
21 | 21 |
urlpatterns = [ |
22 |
url(r'jobs/(?P<pk>[\w,-]+)/$', JobDetailView.as_view(), name='api-job'),
|
|
23 |
url(r'statistics/$', StatisticsListView.as_view(), name='api-statistics-list'),
|
|
22 |
re_path(r'jobs/(?P<pk>[\w,-]+)/$', JobDetailView.as_view(), name='api-job'),
|
|
23 |
path('statistics/', StatisticsListView.as_view(), name='api-statistics-list'),
|
|
24 | 24 |
] |
passerelle/apps/arcgis/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import re_path
|
|
18 | 18 | |
19 | 19 |
from . import views |
20 | 20 | |
21 | 21 |
management_urlpatterns = [ |
22 |
url(r'^(?P<slug>[\w,-]+)/query/new/$', views.QueryNew.as_view(), name='arcgis-query-new'),
|
|
23 |
url(r'^(?P<slug>[\w,-]+)/query/(?P<pk>\d+)/$', views.QueryEdit.as_view(), name='arcgis-query-edit'),
|
|
24 |
url(
|
|
22 |
re_path(r'^(?P<slug>[\w,-]+)/query/new/$', views.QueryNew.as_view(), name='arcgis-query-new'),
|
|
23 |
re_path(r'^(?P<slug>[\w,-]+)/query/(?P<pk>\d+)/$', views.QueryEdit.as_view(), name='arcgis-query-edit'),
|
|
24 |
re_path(
|
|
25 | 25 |
r'^(?P<slug>[\w,-]+)/query/(?P<pk>\d+)/delete/$', |
26 | 26 |
views.QueryDelete.as_view(), |
27 | 27 |
name='arcgis-query-delete', |
passerelle/apps/bdp/urls.py | ||
---|---|---|
1 |
from django.conf.urls import url
|
|
1 |
from django.urls import re_path
|
|
2 | 2 |
from django.views.decorators.csrf import csrf_exempt |
3 | 3 | |
4 | 4 |
from .views import BdpDetailView, PostAdherentView, ResourcesView |
5 | 5 | |
6 | 6 |
urlpatterns = [ |
7 |
url(r'^(?P<slug>[\w,-]+)/$', BdpDetailView.as_view(), name='bdp-view'),
|
|
8 |
url(r'^(?P<slug>[\w,-]+)/(?P<resources>[\w,-]+)/$', ResourcesView.as_view(), name='bdp-resources'),
|
|
9 |
url(
|
|
7 |
re_path(r'^(?P<slug>[\w,-]+)/$', BdpDetailView.as_view(), name='bdp-view'),
|
|
8 |
re_path(r'^(?P<slug>[\w,-]+)/(?P<resources>[\w,-]+)/$', ResourcesView.as_view(), name='bdp-resources'),
|
|
9 |
re_path(
|
|
10 | 10 |
r'^(?P<slug>[\w,-]+)/post/adherent/$', |
11 | 11 |
csrf_exempt(PostAdherentView.as_view()), |
12 | 12 |
name='bdp-post-adherent', |
passerelle/apps/clicrdv/urls.py | ||
---|---|---|
1 |
from django.conf.urls import url
|
|
1 |
from django.urls import re_path
|
|
2 | 2 |
from django.views.decorators.csrf import csrf_exempt |
3 | 3 | |
4 | 4 |
from passerelle.apps.clicrdv import views |
5 | 5 | |
6 | 6 |
urlpatterns = [ |
7 |
url(r'^(?P<slug>[\w,-]+)/$', views.ClicRdvDetailView.as_view(), name='clicrdv-view'),
|
|
8 |
url(
|
|
7 |
re_path(r'^(?P<slug>[\w,-]+)/$', views.ClicRdvDetailView.as_view(), name='clicrdv-view'),
|
|
8 |
re_path(
|
|
9 | 9 |
r'^(?P<slug>[\w,-]+)/interventions/(?P<intervention_id>\d+)/datetimes/$', |
10 | 10 |
views.DateTimesView.as_view(), |
11 | 11 |
name='clicrdv-datetimes', |
12 | 12 |
), |
13 |
url(
|
|
13 |
re_path(
|
|
14 | 14 |
r'^(?P<slug>[\w,-]+)/interventions/(?P<intervention_id>\d+)/dates/$', |
15 | 15 |
views.DatesView.as_view(), |
16 | 16 |
name='clicrdv-dates', |
17 | 17 |
), |
18 |
url(
|
|
18 |
re_path(
|
|
19 | 19 |
r'^(?P<slug>[\w,-]+)/interventions/(?P<intervention_id>\d+)/(?P<date>[\d-]+)/times$', |
20 | 20 |
views.TimesView.as_view(), |
21 | 21 |
name='clicrdv-times', |
22 | 22 |
), |
23 |
url(
|
|
23 |
re_path(
|
|
24 | 24 |
r'^(?P<slug>[\w,-]+)/interventions/(?P<intervention_id>\d+)/create$', |
25 | 25 |
csrf_exempt(views.CreateAppointmentView.as_view()), |
26 | 26 |
name='clicrdv-create-appointment', |
27 | 27 |
), |
28 |
url(
|
|
28 |
re_path(
|
|
29 | 29 |
r'^(?P<slug>[\w,-]+)/create$', |
30 | 30 |
csrf_exempt(views.CreateAppointmentView.as_view()), |
31 | 31 |
name='clicrdv-create-appointment-qs', |
32 | 32 |
), |
33 |
url(
|
|
33 |
re_path(
|
|
34 | 34 |
r'^(?P<slug>[\w,-]+)/(?P<appointment_id>\d+)/cancel$', |
35 | 35 |
views.CancelAppointmentView.as_view(), |
36 | 36 |
name='clicrdv-cancel-appointment', |
passerelle/apps/cmis/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import re_path
|
|
18 | 18 | |
19 | 19 |
from .views import CmisTypeView |
20 | 20 | |
21 | 21 |
management_urlpatterns = [ |
22 |
url(r'^(?P<connector_slug>[\w,-]+)/type/$', CmisTypeView.as_view(), name='cmis-type'),
|
|
22 |
re_path(r'^(?P<connector_slug>[\w,-]+)/type/$', CmisTypeView.as_view(), name='cmis-type'),
|
|
23 | 23 |
] |
passerelle/apps/csvdatasource/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import re_path
|
|
18 | 18 | |
19 | 19 |
from passerelle.apps.csvdatasource import views |
20 | 20 | |
21 | 21 |
management_urlpatterns = [ |
22 |
url(r'^(?P<connector_slug>[\w,-]+)/download/$', views.CsvDownload.as_view(), name='csv-download'), |
|
23 |
url(r'^(?P<connector_slug>[\w,-]+)/queries/new/$', views.NewQueryView.as_view(), name='csv-new-query'), |
|
24 |
url( |
|
22 |
re_path(r'^(?P<connector_slug>[\w,-]+)/download/$', views.CsvDownload.as_view(), name='csv-download'), |
|
23 |
re_path( |
|
24 |
r'^(?P<connector_slug>[\w,-]+)/queries/new/$', views.NewQueryView.as_view(), name='csv-new-query' |
|
25 |
), |
|
26 |
re_path( |
|
25 | 27 |
r'^(?P<connector_slug>[\w,-]+)/queries/(?P<pk>[\w,-]+)/$', |
26 | 28 |
views.UpdateQueryView.as_view(), |
27 | 29 |
name='csv-edit-query', |
28 | 30 |
), |
29 |
url(
|
|
31 |
re_path(
|
|
30 | 32 |
r'^(?P<connector_slug>[\w,-]+)/queries/(?P<pk>[\w,-]+)/delete$', |
31 | 33 |
views.DeleteQueryView.as_view(), |
32 | 34 |
name='csv-delete-query', |
passerelle/apps/gdc/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import re_path
|
|
18 | 18 |
from django.views.decorators.csrf import csrf_exempt |
19 | 19 | |
20 | 20 |
from .views import GdcDetailView, PostDemandeView, StatusView, VoiesView |
21 | 21 | |
22 | 22 |
urlpatterns = [ |
23 |
url(r'^(?P<slug>[\w,-]+)/$', GdcDetailView.as_view(), name='gdc-view'),
|
|
24 |
url(r'^(?P<slug>[\w,-]+)/voies/(?P<insee>\d+)$', VoiesView.as_view(), name='gdc-voies'),
|
|
25 |
url(r'^(?P<slug>[\w,-]+)/post/demande$', csrf_exempt(PostDemandeView.as_view()), name='gdc-post'),
|
|
26 |
url(r'^(?P<slug>[\w,-]+)/status/(?P<ref>\d+)', StatusView.as_view(), name='gdc-status'),
|
|
23 |
re_path(r'^(?P<slug>[\w,-]+)/$', GdcDetailView.as_view(), name='gdc-view'),
|
|
24 |
re_path(r'^(?P<slug>[\w,-]+)/voies/(?P<insee>\d+)$', VoiesView.as_view(), name='gdc-voies'),
|
|
25 |
re_path(r'^(?P<slug>[\w,-]+)/post/demande$', csrf_exempt(PostDemandeView.as_view()), name='gdc-post'),
|
|
26 |
re_path(r'^(?P<slug>[\w,-]+)/status/(?P<ref>\d+)', StatusView.as_view(), name='gdc-status'),
|
|
27 | 27 |
] |
passerelle/apps/opendatasoft/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import re_path
|
|
18 | 18 | |
19 | 19 |
from . import views |
20 | 20 | |
21 | 21 |
management_urlpatterns = [ |
22 |
url(r'^(?P<slug>[\w,-]+)/query/new/$', views.QueryNew.as_view(), name='opendatasoft-query-new'), |
|
23 |
url(r'^(?P<slug>[\w,-]+)/query/(?P<pk>\d+)/$', views.QueryEdit.as_view(), name='opendatasoft-query-edit'), |
|
24 |
url( |
|
22 |
re_path(r'^(?P<slug>[\w,-]+)/query/new/$', views.QueryNew.as_view(), name='opendatasoft-query-new'), |
|
23 |
re_path( |
|
24 |
r'^(?P<slug>[\w,-]+)/query/(?P<pk>\d+)/$', views.QueryEdit.as_view(), name='opendatasoft-query-edit' |
|
25 |
), |
|
26 |
re_path( |
|
25 | 27 |
r'^(?P<slug>[\w,-]+)/query/(?P<pk>\d+)/delete/$', |
26 | 28 |
views.QueryDelete.as_view(), |
27 | 29 |
name='opendatasoft-query-delete', |
passerelle/apps/opengis/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import re_path
|
|
18 | 18 | |
19 | 19 |
from . import views |
20 | 20 | |
21 | 21 |
management_urlpatterns = [ |
22 |
url(r'^(?P<slug>[\w,-]+)/query/new/$', views.QueryNew.as_view(), name='opengis-query-new'),
|
|
23 |
url(r'^(?P<slug>[\w,-]+)/query/(?P<pk>\d+)/$', views.QueryEdit.as_view(), name='opengis-query-edit'),
|
|
24 |
url(
|
|
22 |
re_path(r'^(?P<slug>[\w,-]+)/query/new/$', views.QueryNew.as_view(), name='opengis-query-new'),
|
|
23 |
re_path(r'^(?P<slug>[\w,-]+)/query/(?P<pk>\d+)/$', views.QueryEdit.as_view(), name='opengis-query-edit'),
|
|
24 |
re_path(
|
|
25 | 25 |
r'^(?P<slug>[\w,-]+)/query/(?P<pk>\d+)/delete/$', |
26 | 26 |
views.QueryDelete.as_view(), |
27 | 27 |
name='opengis-query-delete', |
28 | 28 |
), |
29 |
url(
|
|
29 |
re_path(
|
|
30 | 30 |
r'^(?P<slug>[\w,-]+)/query/(?P<pk>\d+)/test-indexing-template/$', |
31 | 31 |
views.TestIndexingTemplate.as_view(), |
32 | 32 |
name='opengis-query-test-indexing-template', |
passerelle/apps/ovh/urls.py | ||
---|---|---|
1 |
from django.conf.urls import url
|
|
1 |
from django.urls import re_path
|
|
2 | 2 | |
3 | 3 |
from . import views |
4 | 4 | |
5 | 5 |
management_urlpatterns = [ |
6 |
url(r'^(?P<slug>[\w,-]+)/request_token/$', views.RequestTokenView.as_view(), name='ovh-request-token'), |
|
7 |
url( |
|
6 |
re_path( |
|
7 |
r'^(?P<slug>[\w,-]+)/request_token/$', views.RequestTokenView.as_view(), name='ovh-request-token' |
|
8 |
), |
|
9 |
re_path( |
|
8 | 10 |
r'^(?P<slug>[\w,-]+)/confirm_token/(?P<uuid>[a-z0-9-]+)/$', |
9 | 11 |
views.ConfirmTokenView.as_view(), |
10 | 12 |
name='ovh-confirm-token', |
passerelle/apps/plone_restapi/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import re_path
|
|
18 | 18 | |
19 | 19 |
from . import views |
20 | 20 | |
21 | 21 |
management_urlpatterns = [ |
22 |
url(r'^(?P<slug>[\w,-]+)/query/new/$', views.QueryNew.as_view(), name='plone-restapi-query-new'),
|
|
23 |
url(
|
|
22 |
re_path(r'^(?P<slug>[\w,-]+)/query/new/$', views.QueryNew.as_view(), name='plone-restapi-query-new'),
|
|
23 |
re_path(
|
|
24 | 24 |
r'^(?P<slug>[\w,-]+)/query/(?P<pk>\d+)/$', views.QueryEdit.as_view(), name='plone-restapi-query-edit' |
25 | 25 |
), |
26 |
url(
|
|
26 |
re_path(
|
|
27 | 27 |
r'^(?P<slug>[\w,-]+)/query/(?P<pk>\d+)/delete/$', |
28 | 28 |
views.QueryDelete.as_view(), |
29 | 29 |
name='plone-restapi-query-delete', |
passerelle/apps/sp_fr/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import re_path
|
|
18 | 18 | |
19 | 19 |
from . import views |
20 | 20 | |
21 | 21 |
management_urlpatterns = [ |
22 |
url(r'^(?P<slug>[\w,-]+)/mapping/new/$', views.MappingNew.as_view(), name='sp-fr-mapping-new'), |
|
23 |
url(r'^(?P<slug>[\w,-]+)/mapping/(?P<pk>\d+)/$', views.MappingEdit.as_view(), name='sp-fr-mapping-edit'), |
|
24 |
url( |
|
22 |
re_path(r'^(?P<slug>[\w,-]+)/mapping/new/$', views.MappingNew.as_view(), name='sp-fr-mapping-new'), |
|
23 |
re_path( |
|
24 |
r'^(?P<slug>[\w,-]+)/mapping/(?P<pk>\d+)/$', views.MappingEdit.as_view(), name='sp-fr-mapping-edit' |
|
25 |
), |
|
26 |
re_path( |
|
25 | 27 |
r'^(?P<slug>[\w,-]+)/mapping/(?P<pk>\d+)/delete/$', |
26 | 28 |
views.MappingDelete.as_view(), |
27 | 29 |
name='sp-fr-mapping-delete', |
28 | 30 |
), |
29 |
url(r'^(?P<slug>[\w,-]+)/run/$', views.run, name='sp-fr-run'),
|
|
31 |
re_path(r'^(?P<slug>[\w,-]+)/run/$', views.run, name='sp-fr-run'),
|
|
30 | 32 |
] |
passerelle/base/urls.py | ||
---|---|---|
1 |
from django.conf.urls import url
|
|
1 |
from django.urls import path, re_path
|
|
2 | 2 | |
3 | 3 |
from .views import ( |
4 | 4 |
AccessRightCreateView, |
... | ... | |
14 | 14 |
) |
15 | 15 | |
16 | 16 |
access_urlpatterns = [ |
17 |
url(r'^$', ApiUserListView.as_view(), name='apiuser-list'),
|
|
18 |
url(r'^add$', ApiUserCreateView.as_view(), name='apiuser-add'),
|
|
19 |
url(r'^(?P<pk>[\w,-]+)/edit$', ApiUserUpdateView.as_view(), name='apiuser-edit'),
|
|
20 |
url(r'^(?P<pk>[\w,-]+)/delete$', ApiUserDeleteView.as_view(), name='apiuser-delete'),
|
|
21 |
url(r'^(?P<pk>[\w,-]+)/remove$', AccessRightDeleteView.as_view(), name='access-right-remove'),
|
|
22 |
url(
|
|
17 |
path('', ApiUserListView.as_view(), name='apiuser-list'),
|
|
18 |
path('add', ApiUserCreateView.as_view(), name='apiuser-add'),
|
|
19 |
re_path(r'^(?P<pk>[\w,-]+)/edit$', ApiUserUpdateView.as_view(), name='apiuser-edit'),
|
|
20 |
re_path(r'^(?P<pk>[\w,-]+)/delete$', ApiUserDeleteView.as_view(), name='apiuser-delete'),
|
|
21 |
re_path(r'^(?P<pk>[\w,-]+)/remove$', AccessRightDeleteView.as_view(), name='access-right-remove'),
|
|
22 |
re_path(
|
|
23 | 23 |
r'^accessright/add/(?P<resource_type>[\w,-]+)/(?P<resource_pk>[\w,-]+)/(?P<codename>[\w,-]+)/', |
24 | 24 |
AccessRightCreateView.as_view(), |
25 | 25 |
name='access-right-add', |
26 | 26 |
), |
27 |
url(
|
|
27 |
re_path(
|
|
28 | 28 |
r'logging/parameters/(?P<resource_type>[\w,-]+)/(?P<resource_pk>[\w,-]+)/$', |
29 | 29 |
LoggingParametersUpdateView.as_view(), |
30 | 30 |
name='logging-parameters', |
31 | 31 |
), |
32 |
url(
|
|
32 |
re_path(
|
|
33 | 33 |
r'manage/availability/(?P<resource_type>[\w,-]+)/(?P<resource_pk>[\w,-]+)/$', |
34 | 34 |
ManageAvailabilityView.as_view(), |
35 | 35 |
name='manage-availability', |
... | ... | |
37 | 37 |
] |
38 | 38 | |
39 | 39 |
import_export_urlpatterns = [ |
40 |
url(r'^import$', ImportSiteView.as_view(), name='import-site'),
|
|
41 |
url(r'^export$', ExportSiteView.as_view(), name='export-site'),
|
|
40 |
path('import', ImportSiteView.as_view(), name='import-site'),
|
|
41 |
path('export', ExportSiteView.as_view(), name='export-site'),
|
|
42 | 42 |
] |
passerelle/contrib/fake_family/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import re_path
|
|
18 | 18 | |
19 | 19 |
from passerelle.contrib.fake_family import views |
20 | 20 | |
21 | 21 |
urlpatterns = [ |
22 |
url(r'^(?P<slug>[\w,-]+)/$', views.FakeFamilyDetailView.as_view(), name='fake-family-view'),
|
|
23 |
url(r'^(?P<slug>[\w,-]+)/dump/$', views.DumpView.as_view(), name='fake-family-dump'),
|
|
24 |
url(r'^(?P<slug>[\w,-]+)/family/link/$', views.LinkView.as_view(), name='fake-family-link'),
|
|
25 |
url(r'^(?P<slug>[\w,-]+)/family/unlink/$', views.UnlinkView.as_view(), name='fake-family-unlink'),
|
|
26 |
url(r'^(?P<slug>[\w,-]+)/family/$', views.FamilyView.as_view(), name='fake-family-info'),
|
|
27 |
url(
|
|
22 |
re_path(r'^(?P<slug>[\w,-]+)/$', views.FakeFamilyDetailView.as_view(), name='fake-family-view'),
|
|
23 |
re_path(r'^(?P<slug>[\w,-]+)/dump/$', views.DumpView.as_view(), name='fake-family-dump'),
|
|
24 |
re_path(r'^(?P<slug>[\w,-]+)/family/link/$', views.LinkView.as_view(), name='fake-family-link'),
|
|
25 |
re_path(r'^(?P<slug>[\w,-]+)/family/unlink/$', views.UnlinkView.as_view(), name='fake-family-unlink'),
|
|
26 |
re_path(r'^(?P<slug>[\w,-]+)/family/$', views.FamilyView.as_view(), name='fake-family-info'),
|
|
27 |
re_path(
|
|
28 | 28 |
r'^(?P<slug>[\w,-]+)/family/(?P<key>[\w,-]+)/$', views.FamilyKeyView.as_view(), name='fake-family-key' |
29 | 29 |
), |
30 | 30 |
] |
passerelle/contrib/solis_apa/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import re_path
|
|
18 | 18 | |
19 | 19 |
from passerelle.contrib.solis_apa import views |
20 | 20 | |
21 | 21 |
urlpatterns = [ |
22 |
url(r'^(?P<slug>[\w,-]+)/$', views.SolisAPADetailView.as_view(), name='solis-apa-view'),
|
|
23 |
url(r'^(?P<slug>[\w,-]+)/communes/$', views.CommunesView.as_view(), name='solis-apa-communes'),
|
|
24 |
url(r'^(?P<slug>[\w,-]+)/lieux/$', views.LieuxView.as_view(), name='solis-apa-lieux'),
|
|
25 |
url(r'^(?P<slug>[\w,-]+)/homonymes/$', views.HomonymesView.as_view(), name='solis-apa-homonymes'),
|
|
26 |
url(
|
|
22 |
re_path(r'^(?P<slug>[\w,-]+)/$', views.SolisAPADetailView.as_view(), name='solis-apa-view'),
|
|
23 |
re_path(r'^(?P<slug>[\w,-]+)/communes/$', views.CommunesView.as_view(), name='solis-apa-communes'),
|
|
24 |
re_path(r'^(?P<slug>[\w,-]+)/lieux/$', views.LieuxView.as_view(), name='solis-apa-lieux'),
|
|
25 |
re_path(r'^(?P<slug>[\w,-]+)/homonymes/$', views.HomonymesView.as_view(), name='solis-apa-homonymes'),
|
|
26 |
re_path(
|
|
27 | 27 |
r'^(?P<slug>[\w,-]+)/referential/(?P<reference_name>[\w,-]+)/$', |
28 | 28 |
views.ReferentialView.as_view(), |
29 | 29 |
name='solis-apa-referential', |
30 | 30 |
), |
31 |
url(
|
|
31 |
re_path(
|
|
32 | 32 |
r'^(?P<slug>[\w,-]+)/suivi/(?P<suivi_type>[\w,-]+)/$', |
33 | 33 |
views.SuiviView.as_view(), |
34 | 34 |
name='solis-apa-suivi', |
35 | 35 |
), |
36 |
url(r'^(?P<slug>[\w,-]+)/integration/$', views.IntegrationView.as_view(), name='solis-apa-integration'), |
|
36 |
re_path( |
|
37 |
r'^(?P<slug>[\w,-]+)/integration/$', views.IntegrationView.as_view(), name='solis-apa-integration' |
|
38 |
), |
|
37 | 39 |
] |
passerelle/contrib/toulouse_smart/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import re_path
|
|
18 | 18 | |
19 | 19 |
from .views import TypeIntervention, TypeInterventionAsBlocks |
20 | 20 | |
21 | 21 |
management_urlpatterns = [ |
22 |
url(
|
|
22 |
re_path(
|
|
23 | 23 |
r'^(?P<slug>[\w,-]+)/type-intervention/as-blocks/$', |
24 | 24 |
TypeInterventionAsBlocks.as_view(), |
25 | 25 |
name='toulouse-smart-type-intervention-as-blocks', |
26 | 26 |
), |
27 |
url(
|
|
27 |
re_path(
|
|
28 | 28 |
r'^(?P<slug>[\w,-]+)/type-intervention/$', |
29 | 29 |
TypeIntervention.as_view(), |
30 | 30 |
name='toulouse-smart-type-intervention', |
passerelle/plugins.py | ||
---|---|---|
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 | 17 |
from django.apps import apps |
18 |
from django.conf.urls import include, url
|
|
18 |
from django.urls import include, re_path
|
|
19 | 19 | |
20 | 20 |
from .urls_utils import app_enabled, manager_required, required, trust_required |
21 | 21 | |
... | ... | |
36 | 36 |
if hasattr(obj, 'get_before_urls'): |
37 | 37 |
urls = obj.get_before_urls() |
38 | 38 |
if urls: |
39 |
before_urls.append(url('^', include(urls)))
|
|
39 |
before_urls.append(re_path('^', include(urls)))
|
|
40 | 40 |
if hasattr(obj, 'get_after_urls'): |
41 | 41 |
urls = obj.get_after_urls() |
42 | 42 |
if urls: |
43 |
after_urls.append(url('^', include(urls)))
|
|
43 |
after_urls.append(re_path('^', include(urls)))
|
|
44 | 44 |
elif hasattr(obj, 'get_urls'): |
45 | 45 |
url_prefix = '^%s/' % connector_slug |
46 | 46 |
urls = obj.get_urls() |
47 | 47 |
if urls: |
48 | 48 |
urls = required(app_enabled(app.label), urls) |
49 |
after_urls.append(url(url_prefix, include(urls), kwargs={'connector': connector_slug})) |
|
49 |
after_urls.append( |
|
50 |
re_path(url_prefix, include(urls), kwargs={'connector': connector_slug}) |
|
51 |
) |
|
50 | 52 |
if hasattr(obj, 'get_management_urls'): |
51 | 53 |
url_prefix = '^manage/%s/' % connector_slug |
52 | 54 |
urls = obj.get_management_urls() |
53 | 55 |
if urls: |
54 | 56 |
urls = required(app_enabled(app.label), urls) |
55 | 57 |
urls = required(manager_required, urls) |
56 |
after_urls.append(url(url_prefix, include(urls), kwargs={'connector': connector_slug})) |
|
58 |
after_urls.append( |
|
59 |
re_path(url_prefix, include(urls), kwargs={'connector': connector_slug}) |
|
60 |
) |
|
57 | 61 |
if hasattr(obj, 'get_statistics_urls'): |
58 | 62 |
url_prefix = '^api/%s/' % connector_slug |
59 | 63 |
urls = obj.get_statistics_urls() |
60 | 64 |
if urls: |
61 | 65 |
urls = required(app_enabled(app.label), urls) |
62 | 66 |
urls = required(trust_required, urls) |
63 |
after_urls.append(url(url_prefix, include(urls), kwargs={'connector': connector_slug})) |
|
67 |
after_urls.append( |
|
68 |
re_path(url_prefix, include(urls), kwargs={'connector': connector_slug}) |
|
69 |
) |
|
64 | 70 | |
65 | 71 |
return before_urls + urlpatterns + after_urls |
passerelle/sms/models.py | ||
---|---|---|
16 | 16 |
import logging |
17 | 17 |
import re |
18 | 18 | |
19 |
from django.conf.urls import url |
|
20 | 19 |
from django.contrib.postgres.fields import ArrayField |
21 | 20 |
from django.core.validators import RegexValidator |
22 | 21 |
from django.db import models |
23 |
from django.urls import reverse |
|
22 |
from django.urls import re_path, reverse
|
|
24 | 23 |
from django.utils.module_loading import import_string |
25 | 24 |
from django.utils.translation import gettext_lazy as _ |
26 | 25 | |
... | ... | |
113 | 112 |
from .views import SmsStatisticsView |
114 | 113 | |
115 | 114 |
statistics_urlpatterns = [ |
116 |
url(
|
|
115 |
re_path(
|
|
117 | 116 |
r'^(?P<slug>[\w,-]+)/sms-count/$', |
118 | 117 |
SmsStatisticsView.as_view(), |
119 | 118 |
name='api-statistics-sms-%s' % cls.get_connector_slug(), |
passerelle/sms/urls.py | ||
---|---|---|
1 |
from django.conf.urls import url
|
|
1 |
from django.urls import re_path
|
|
2 | 2 | |
3 | 3 |
from . import views |
4 | 4 | |
5 | 5 |
management_urlpatterns = [ |
6 |
url(r'^(?P<slug>[\w,-]+)/test-send/$', views.SmsTestSendView.as_view(), name='sms-test-send'),
|
|
6 |
re_path(r'^(?P<slug>[\w,-]+)/test-send/$', views.SmsTestSendView.as_view(), name='sms-test-send'),
|
|
7 | 7 |
] |
passerelle/urls.py | ||
---|---|---|
1 | 1 |
from django.conf import settings |
2 |
from django.conf.urls import include, url |
|
3 | 2 |
from django.contrib import admin |
4 | 3 |
from django.contrib.auth.decorators import login_required |
5 | 4 |
from django.contrib.staticfiles.urls import staticfiles_urlpatterns |
5 |
from django.urls import include, path, re_path |
|
6 | 6 |
from django.views.static import serve as static_serve |
7 | 7 | |
8 | 8 |
from .api.urls import urlpatterns as api_urls |
... | ... | |
30 | 30 |
admin.autodiscover() |
31 | 31 | |
32 | 32 |
urlpatterns = [ |
33 |
url(r'^$', HomePageView.as_view(), name='homepage'),
|
|
34 |
url(r'^manage/$', manager_required(ManageView.as_view()), name='manage-home'),
|
|
35 |
url(r'^manage/menu.json$', manager_required(menu_json), name='menu-json'),
|
|
36 |
url(r'^manage/add$', manager_required(ManageAddView.as_view()), name='add-connector'),
|
|
37 |
url(
|
|
33 |
path('', HomePageView.as_view(), name='homepage'),
|
|
34 |
path('manage/', manager_required(ManageView.as_view()), name='manage-home'),
|
|
35 |
re_path(r'^manage/menu.json$', manager_required(menu_json), name='menu-json'),
|
|
36 |
path('manage/add', manager_required(ManageAddView.as_view()), name='add-connector'),
|
|
37 |
re_path(
|
|
38 | 38 |
r'^media/(?P<path>.*)$', |
39 | 39 |
login_required(static_serve), |
40 | 40 |
{ |
41 | 41 |
'document_root': settings.MEDIA_ROOT, |
42 | 42 |
}, |
43 | 43 |
), |
44 |
url(r'^admin/', admin.site.urls),
|
|
45 |
url(r'^manage/access/', decorated_includes(manager_required, include(access_urlpatterns))),
|
|
46 |
url(r'^manage/', decorated_includes(manager_required, include(import_export_urlpatterns))),
|
|
47 |
url('^api/', include(api_urls)),
|
|
44 |
re_path(r'^admin/', admin.site.urls),
|
|
45 |
re_path(r'^manage/access/', decorated_includes(manager_required, include(access_urlpatterns))),
|
|
46 |
re_path(r'^manage/', decorated_includes(manager_required, include(import_export_urlpatterns))),
|
|
47 |
re_path('^api/', include(api_urls)),
|
|
48 | 48 |
] |
49 | 49 | |
50 | 50 |
# add patterns from apps |
... | ... | |
52 | 52 | |
53 | 53 |
# add authentication patterns |
54 | 54 |
urlpatterns += [ |
55 |
url(r'^logout/$', logout, name='auth_logout'),
|
|
56 |
url(r'^login/$', login, name='auth_login'),
|
|
55 |
path('logout/', logout, name='auth_logout'),
|
|
56 |
path('login/', login, name='auth_login'),
|
|
57 | 57 |
] |
58 | 58 | |
59 | 59 |
if 'mellon' in settings.INSTALLED_APPS: |
60 | 60 |
urlpatterns += [ |
61 |
url(
|
|
61 |
re_path(
|
|
62 | 62 |
r'^accounts/mellon/', |
63 | 63 |
include('mellon.urls'), |
64 | 64 |
kwargs={ |
... | ... | |
69 | 69 | |
70 | 70 | |
71 | 71 |
urlpatterns += [ |
72 |
url(
|
|
72 |
re_path(
|
|
73 | 73 |
r'^manage/(?P<connector>[\w,-]+)/', |
74 | 74 |
decorated_includes( |
75 | 75 |
manager_required, |
76 | 76 |
include( |
77 | 77 |
[ |
78 |
url(r'^add$', GenericCreateConnectorView.as_view(), name='create-connector'),
|
|
79 |
url(
|
|
78 |
path('add', GenericCreateConnectorView.as_view(), name='create-connector'),
|
|
79 |
re_path(
|
|
80 | 80 |
r'^(?P<slug>[\w,-]+)/delete$', |
81 | 81 |
GenericDeleteConnectorView.as_view(), |
82 | 82 |
name='delete-connector', |
83 | 83 |
), |
84 |
url(
|
|
84 |
re_path(
|
|
85 | 85 |
r'^(?P<slug>[\w,-]+)/edit$', GenericEditConnectorView.as_view(), name='edit-connector' |
86 | 86 |
), |
87 |
url(
|
|
87 |
re_path(
|
|
88 | 88 |
r'^(?P<slug>[\w,-]+)/logs/$', |
89 | 89 |
GenericViewLogsConnectorView.as_view(), |
90 | 90 |
name='view-logs-connector', |
91 | 91 |
), |
92 |
url(
|
|
92 |
re_path(
|
|
93 | 93 |
r'^(?P<slug>[\w,-]+)/logs/(?P<log_pk>\d+)/$', |
94 | 94 |
GenericLogView.as_view(), |
95 | 95 |
name='view-log', |
96 | 96 |
), |
97 |
url(
|
|
97 |
re_path(
|
|
98 | 98 |
r'^(?P<slug>[\w,-]+)/jobs/$', |
99 | 99 |
GenericViewJobsConnectorView.as_view(), |
100 | 100 |
name='view-jobs-connector', |
101 | 101 |
), |
102 |
url(
|
|
102 |
re_path(
|
|
103 | 103 |
r'^(?P<slug>[\w,-]+)/jobs/(?P<job_pk>\d+)/$', |
104 | 104 |
GenericJobView.as_view(), |
105 | 105 |
name='view-job', |
106 | 106 |
), |
107 |
url(
|
|
107 |
re_path(
|
|
108 | 108 |
r'^(?P<slug>[\w,-]+)/jobs/(?P<job_pk>\d+)/restart/$', |
109 | 109 |
GenericRestartJobView.as_view(), |
110 | 110 |
name='restart-job', |
111 | 111 |
), |
112 |
url(
|
|
112 |
re_path(
|
|
113 | 113 |
r'^(?P<slug>[\w,-]+)/export$', |
114 | 114 |
GenericExportConnectorView.as_view(), |
115 | 115 |
name='export-connector', |
... | ... | |
121 | 121 |
] |
122 | 122 | |
123 | 123 |
urlpatterns += [ |
124 |
url(
|
|
124 |
re_path(
|
|
125 | 125 |
r'^(?P<connector>[\w,-]+)/(?P<slug>[\w,-]+)/$', GenericConnectorView.as_view(), name='view-connector' |
126 | 126 |
), |
127 |
url(
|
|
127 |
re_path(
|
|
128 | 128 |
r'^(?P<connector>[\w,-]+)/(?P<slug>[\w,-]+)/(?P<endpoint>[\w,-.]+)(?:/(?P<rest>.*))?$', |
129 | 129 |
GenericEndpointView.as_view(), |
130 | 130 |
name='generic-endpoint', |
... | ... | |
135 | 135 |
import debug_toolbar # pylint: disable=import-error |
136 | 136 | |
137 | 137 |
urlpatterns = [ |
138 |
url(r'^__debug__/', include(debug_toolbar.urls)),
|
|
138 |
re_path(r'^__debug__/', include(debug_toolbar.urls)),
|
|
139 | 139 |
] + urlpatterns |
140 | 140 | |
141 | 141 |
urlpatterns += staticfiles_urlpatterns() |
passerelle/views.py | ||
---|---|---|
25 | 25 |
from dateutil import parser as date_parser |
26 | 26 |
from django.apps import apps |
27 | 27 |
from django.conf import settings |
28 |
from django.conf.urls import url |
|
29 | 28 |
from django.contrib.auth import logout as auth_logout |
30 | 29 |
from django.contrib.auth import views as auth_views |
31 | 30 |
from django.core.cache import cache |
... | ... | |
34 | 33 |
from django.db.models import Q |
35 | 34 |
from django.http import Http404, HttpResponse, HttpResponseRedirect |
36 | 35 |
from django.shortcuts import get_object_or_404, resolve_url |
37 |
from django.urls import reverse |
|
36 |
from django.urls import re_path, reverse
|
|
38 | 37 |
from django.utils.encoding import force_bytes, force_str |
39 | 38 |
from django.utils.timezone import is_naive, make_aware |
40 | 39 |
from django.utils.translation import gettext_lazy as _ |
... | ... | |
431 | 430 |
if not method.endpoint_info.name == kwargs.get('endpoint'): |
432 | 431 |
continue |
433 | 432 |
if method.endpoint_info.pattern: |
434 |
pattern = url(method.endpoint_info.pattern, method)
|
|
433 |
pattern = re_path(method.endpoint_info.pattern, method)
|
|
435 | 434 |
match = pattern.resolve(kwargs.get('rest') or '') |
436 | 435 |
if match: |
437 | 436 |
self.endpoint = method |
... | ... | |
584 | 583 | |
585 | 584 |
def get(self, request, *args, **kwargs): |
586 | 585 |
if self.endpoint.endpoint_info.pattern: |
587 |
pattern = url(self.endpoint.endpoint_info.pattern, self.endpoint)
|
|
586 |
pattern = re_path(self.endpoint.endpoint_info.pattern, self.endpoint)
|
|
588 | 587 |
match = pattern.resolve(kwargs.get('rest') or '') |
589 | 588 |
if not match: |
590 | 589 |
raise Http404() |
591 |
- |