-
-
Notifications
You must be signed in to change notification settings - Fork 7k
update docs to use path() / re_path() instead of url() #6548
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
Conversation
auvipy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious, why not path() instead of re_path?
|
Now that we've dropped Django < 2.0 (did we ?) it should be fine. |
|
That's what I am for Path() :) |
|
We're support Django 1.11 until it's EOL (so another 9 months yet...) (We're going to drop Python 2 for DRF 3.10. Yes, @auvipy, I'll get to your PR 🙂) |
|
Personally, I'd be happy to update all these examples to Conjecture: No-one is starting a project on 1.11 (and doesn't already know what they're about) at this point. |
|
Should I resume the work to finish the remaining python2 parts? |
|
Good point on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome work! angle bracket and type are not must be required. So IMHO without that, it should be fine. though the core team could share better insight regarding that.
|
I'm happy for you to leave some |
|
Aside: from the upcoming release notes:
Given that Django 3.0 will be released in December, we can revisit this ticket then. |
|
This would be a really nice addition, yup. There's a few conflicts that need resolving. (And yes, we still support Django 1.11, but that's no good reason for us to not use the nicer syntax in the docs.) |
|
I think this PR can be closed as well following #7512 |
|
#7512 has indeed fixed these. Thanks for the initial work @basilbegonia |
Description
The docs always use
url()in examples. However, re_path is recommended by the django docs and url() is likely to be deprecated