Skip to content

Commit

Permalink
fix: codemod changes
Browse files Browse the repository at this point in the history
  • Loading branch information
irtazaakram committed Sep 15, 2023
1 parent 293f355 commit 23f13e6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions designer/apps/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
All API URLs should be versioned, so urlpatterns should only
contain namespaces for the active versions of the API.
"""
from django.urls import re_path, include
from django.urls import include, path


app_name = 'api'

urlpatterns = [
re_path(r'^v1/', include(('designer.apps.api.v1.urls', 'v1'))),
path('v1/', include(('designer.apps.api.v1.urls', 'v1'))),
]
28 changes: 14 additions & 14 deletions designer/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from auth_backends.urls import oauth2_urlpatterns
from django.conf import settings
from django.urls import re_path, include
from django.urls import include, path
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import RedirectView
Expand All @@ -42,21 +42,21 @@
)

urlpatterns = oauth2_urlpatterns + [
re_path(r'^api/', include('designer.apps.api.urls')),
re_path(r'^api-docs/$', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
path('api/', include('designer.apps.api.urls')),
path('api-docs/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
# Use the same auth views for all logins, including those originating from the browseable API.
re_path(r'^api-auth/', include(oauth2_urlpatterns)),
re_path(r'^auto_auth/$', core_views.AutoAuth.as_view(), name='auto_auth'),
re_path(r'^health/$', core_views.health, name='health'),
re_path(r'^documents/', include(wagtaildocs_urls)),
re_path(r'^pages/', include(wagtail_urls)),
re_path(r'^cms/login/$', core_views.wagtail_admin_access_check),
re_path(r'^cms/logout/$', RedirectView.as_view(url='/logout/')),
re_path(r'^cms/sites/new/$', SiteCreationView.as_view(), name='create-new-site'),
re_path(r'^cms/', include(wagtailadmin_urls)),
re_path(r'^$', RedirectView.as_view(url='/cms/'))
path('api-auth/', include(oauth2_urlpatterns)),
path('auto_auth/', core_views.AutoAuth.as_view(), name='auto_auth'),
path('health/', core_views.health, name='health'),
path('documents/', include(wagtaildocs_urls)),
path('pages/', include(wagtail_urls)),
path('cms/login/', core_views.wagtail_admin_access_check),
path('cms/logout/', RedirectView.as_view(url='/logout/')),
path('cms/sites/new/', SiteCreationView.as_view(), name='create-new-site'),
path('cms/', include(wagtailadmin_urls)),
path('', RedirectView.as_view(url='/cms/'))
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

if settings.DEBUG and os.environ.get('ENABLE_DJANGO_TOOLBAR', False): # pragma: no cover
import debug_toolbar
urlpatterns.append(re_path(r'^__debug__/', include(debug_toolbar.urls)))
urlpatterns.append(path('__debug__/', include(debug_toolbar.urls)))
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ testpaths = designer/apps
[testenv]
deps =
django32: -r requirements/django.txt
django42: Django>=4.2,<4.3
django42: Django>=4.2,<5.0
-r {toxinidir}/requirements/test.txt
commands =
{posargs:python -Wd -m pytest}
Expand Down

0 comments on commit 23f13e6

Please sign in to comment.