discolabs / django-shopify-auth

A package for adding Shopify authentication to a Django app.
MIT License
145 stars 54 forks source link

Update URL definition to make app compatible with Django 4 #79

Closed tystar86 closed 2 years ago

tystar86 commented 2 years ago

Make app compatible with Django 4

stlk commented 2 years ago

Could you convert this to path instead please? We don't need regular expressions here so we should use the new default.

https://consideratecode.com/2018/05/02/django-2-0-url-to-path-cheatsheet/

Here's an example:


urlpatterns = [
    path("", RedirectView.as_view(pattern_name="merchant_admin:dashboard", query_string=True)),
    path("dashboard", views.DashboardView.as_view(), name="dashboard"),
    path("recommended-apps", views.RecommendedAppsView.as_view(), name="recommended-apps"),
    path("feedback", views.FeedbackView.as_view(), name="feedback"),
    path("dashboard/run-analysis", views.RunAnalysisView.as_view(), name="run-analysis"),
    path("dashboard/tag-customers", views.CustomersTagView.as_view(), name="tag-customers"),
    path("dashboard/customers-export", views.CustomersExportView.as_view(), name="customers-export"),
]