Skip to content

Commit

Permalink
fix: update django url import to use re_path because of django 4
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobernardoaf committed Oct 20, 2022
1 parent efed981 commit 5190b37
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions weni/analytics_api/urls.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from django.conf.urls import url
from django.urls import re_path
from rest_framework.urlpatterns import format_suffix_patterns

from .views import ContactAnalyticsEndpoint, FlowRunAnalyticsEndpoint

urlpatterns = [
url(r"^analytics/contacts/$", ContactAnalyticsEndpoint.as_view(), name="api.v2.analytics.contacts",),
url(r"^analytics/flow-runs/$", FlowRunAnalyticsEndpoint.as_view(), name="api.v2.analytics.flow_runs",),
re_path(r"^analytics/contacts/$", ContactAnalyticsEndpoint.as_view(), name="api.v2.analytics.contacts",),
re_path(r"^analytics/flow-runs/$", FlowRunAnalyticsEndpoint.as_view(), name="api.v2.analytics.flow_runs",),
]

urlpatterns = format_suffix_patterns(urlpatterns, allowed=["json", "api"])
5 changes: 2 additions & 3 deletions weni/auth/urls.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from django.conf.urls import include, url
from django.urls import path
from django.urls import include, path, re_path

from weni.auth.views import (
check_user_legacy,
Expand All @@ -9,7 +8,7 @@
)

urlpatterns = [
url(r"^oidc/", include("mozilla_django_oidc.urls")),
re_path(r"^oidc/", include("mozilla_django_oidc.urls")),
path("check-user-legacy/<str:email>/", check_user_legacy, name="check-user-legacy"),
path("weni/<uuid:organization>/authenticate", WeniAuthenticationRequestView.as_view(), name="weni-authenticate",),
path(
Expand Down
4 changes: 2 additions & 2 deletions weni/channel_stats/urls.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from django.conf.urls import url
from django.urls import re_path
from rest_framework.urlpatterns import format_suffix_patterns

from . import views

urlpatterns = [
url(r"^channel_stats$", views.ChannelStatsEndpoint.as_view(), name="api.v2.channel_stats.channels",),
re_path(r"^channel_stats$", views.ChannelStatsEndpoint.as_view(), name="api.v2.channel_stats.channels",),
]

urlpatterns = format_suffix_patterns(urlpatterns, allowed=["json", "api"])
4 changes: 2 additions & 2 deletions weni/ticketer_queues/urls.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from django.conf.urls import url
from django.urls import re_path
from rest_framework.urlpatterns import format_suffix_patterns

from weni.ticketer_queues.views import TicketerQueuesEndpoint

urlpatterns = [
url(
re_path(
r"ticketer_queues$",
TicketerQueuesEndpoint.as_view(),
name="api.v2.ticketer_queues",
Expand Down

0 comments on commit 5190b37

Please sign in to comment.