Skip to content

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.

@lovelydinosaur
Copy link
Contributor

Yup, looks good.
Thanks!

@lovelydinosaur lovelydinosaur 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.

3 participants