diff options
| author | Tim Graham <timograham@gmail.com> | 2018-12-07 17:52:28 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-12-31 10:47:32 -0500 |
| commit | 043bd709425149b8eff3fb821cba5c23aaebd0df (patch) | |
| tree | 7624be405a6a6e5a041e2852251ef76e9d28fa7d /tests/i18n/patterns/urls/default.py | |
| parent | 1136d57f01ce3e3efab44163ccd7b3b34ec4207f (diff) | |
Updated test URL patterns to use path() and re_path().
Diffstat (limited to 'tests/i18n/patterns/urls/default.py')
| -rw-r--r-- | tests/i18n/patterns/urls/default.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/i18n/patterns/urls/default.py b/tests/i18n/patterns/urls/default.py index b7fc38cf89..b0c2f2585e 100644 --- a/tests/i18n/patterns/urls/default.py +++ b/tests/i18n/patterns/urls/default.py @@ -1,20 +1,20 @@ -from django.conf.urls import include, url from django.conf.urls.i18n import i18n_patterns +from django.urls import include, path, re_path from django.utils.translation import gettext_lazy as _ from django.views.generic import TemplateView view = TemplateView.as_view(template_name='dummy.html') urlpatterns = [ - url(r'^not-prefixed/$', view, name='not-prefixed'), - url(r'^not-prefixed-include/', include('i18n.patterns.urls.included')), - url(_(r'^translated/$'), view, name='no-prefix-translated'), - url(_(r'^translated/(?P<slug>[\w-]+)/$'), view, name='no-prefix-translated-slug'), + path('not-prefixed/', view, name='not-prefixed'), + path('not-prefixed-include/', include('i18n.patterns.urls.included')), + re_path(_(r'^translated/$'), view, name='no-prefix-translated'), + re_path(_(r'^translated/(?P<slug>[\w-]+)/$'), view, name='no-prefix-translated-slug'), ] urlpatterns += i18n_patterns( - url(r'^prefixed/$', view, name='prefixed'), - url(r'^prefixed\.xml$', view, name='prefixed_xml'), - url(_(r'^users/$'), view, name='users'), - url(_(r'^account/'), include('i18n.patterns.urls.namespace', namespace='account')), + path('prefixed/', view, name='prefixed'), + path('prefixed.xml', view, name='prefixed_xml'), + re_path(_(r'^users/$'), view, name='users'), + re_path(_(r'^account/'), include('i18n.patterns.urls.namespace', namespace='account')), ) |
