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

Update quickstart to Django 2.0 routing syntax #6385

Merged
merged 4 commits into from Jan 8, 2019
Merged

Update quickstart to Django 2.0 routing syntax #6385

merged 4 commits into from Jan 8, 2019

Conversation

johnthagen
Copy link
Contributor

@johnthagen johnthagen commented Dec 27, 2018

As a new user to DRF, I was confused when I did the Django tutorial (which uses path) and then tried out the DRF quickstart and saw that it still used the older (probably soon to be deprecated) url routing. I think this will help alleviate some confusion for new users.

I believe this was overlooked in #5964.

Related to #5963.

cc @chrisshyi

@johnthagen
Copy link
Contributor Author

johnthagen commented Dec 27, 2018

@chrisshyi In your PR, you removed all of the r'' raw string identifiers. Are they no longer needed in path formulation?

Edit: The Django tutorial doesn't use r'', so I'll remove them here too for consistency.

urlpatterns = [
   path('polls/', include('polls.urls')),
   path('admin/', admin.site.urls),
]

@chrisshyi
Copy link
Contributor

chrisshyi commented Dec 30, 2018

I believe the raw string identifiers were not needed in new path formulation

@johnthagen
Copy link
Contributor Author

Thanks @chrisshyi. I've removed them in the latest commits.

@tomchristie
Copy link
Member

Yup, looks good.
Thanks!

@tomchristie tomchristie merged commit 0860ef9 into encode:master Jan 8, 2019
@johnthagen johnthagen deleted the patch-3 branch January 8, 2019 12:20
pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull request Nov 17, 2020
* Update quickstart to Django 2.0 routing syntax

* Remove uneccessary raw string identifiers

* Correctly import path function

* Fix import path to use django.urls

This is what is prescribed in the Django 2.1 tutorial
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

3 participants