From df41b5a05d4e00e80e73afe629072e37873e767a Mon Sep 17 00:00:00 2001 From: Sjoerd Job Postmus Date: Thu, 20 Oct 2016 19:29:04 +0200 Subject: Fixed #28593 -- Added a simplified URL routing syntax per DEP 0201. Thanks Aymeric Augustin for shepherding the DEP and patch review. Thanks Marten Kenbeek and Tim Graham for contributing to the code. Thanks Tom Christie, Shai Berger, and Tim Graham for the docs. --- tests/check_framework/urls/beginning_with_slash.py | 4 +++- tests/check_framework/urls/include_contains_tuple.py | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 tests/check_framework/urls/include_contains_tuple.py (limited to 'tests/check_framework/urls') diff --git a/tests/check_framework/urls/beginning_with_slash.py b/tests/check_framework/urls/beginning_with_slash.py index 736e91820e..8dac96745c 100644 --- a/tests/check_framework/urls/beginning_with_slash.py +++ b/tests/check_framework/urls/beginning_with_slash.py @@ -1,5 +1,7 @@ from django.conf.urls import url +from django.urls import path urlpatterns = [ - url(r'/starting-with-slash/$', lambda x: x), + path('/path-starting-with-slash/', lambda x: x), + url(r'/url-starting-with-slash/$', lambda x: x), ] diff --git a/tests/check_framework/urls/include_contains_tuple.py b/tests/check_framework/urls/include_contains_tuple.py new file mode 100644 index 0000000000..02717a743c --- /dev/null +++ b/tests/check_framework/urls/include_contains_tuple.py @@ -0,0 +1,5 @@ +from django.urls import include, path + +urlpatterns = [ + path('', include([(r'^tuple/$', lambda x: x)])), +] -- cgit v1.3