Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support URLPattern and URLResolver from Django 2.0 #5500

Merged
merged 2 commits into from Oct 16, 2017
Merged

Support URLPattern and URLResolver from Django 2.0 #5500

merged 2 commits into from Oct 16, 2017

Conversation

mkuznets
Copy link
Contributor

@mkuznets mkuznets commented Oct 14, 2017

Description

Fixes #5456

My attempt to make sense of the new URL routing API from Django 2.0:

  • RegexURLPattern and RegexURLResolver are renamed to URLPattern and URLResolver respectively.
  • Their regexes are now encapsulated inside RegexPattern/RoutePattern instances and are located at self.pattern.regex (was self.regex).
  • Both url() and the new path() return URLPattern. So, no changes needed to support the new routing syntax.

@carltongibson carltongibson added this to the 3.7.1 Release milestone Oct 16, 2017
Copy link
Collaborator

@carltongibson carltongibson left a comment

@mkuznets Great stuff. Really clears up the test suite a lot!

Thanks for the input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants