Skip to content

Conversation

@chrisshyi
Copy link
Contributor

@chrisshyi chrisshyi commented May 2, 2018

Updated part 1 of the DRF tutorial to use django.urls.path instead of
django.conf.urls.url

Description

refs #5963 , updated tutorial part 1 to use Django 2.0 routing syntax.

Updated part 1 of the DRF tutorial to use django.urls.path instead of
django.conf.urls.url
@encode encode deleted a comment from codecov-io May 3, 2018
@lovelydinosaur
Copy link
Contributor

Looking good, thanks!

We'll need this pull request to include all the pages in the tutorial, so that we can update them all at once.

(Doesn't matter from our side if you choose to make each of those each as separate commits on this pull request, or add them all at once. We'll squash them into a single commit when we merge this.)


from django.conf.urls import url
from django.urls import path
# note that the path function was added in Django 2.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest we drop these two lines of comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do, I'll try to get through the rest of the tutorial pages in the next two days and update them to the new routing syntax as needed.

@chrisshyi chrisshyi changed the title Update tutorial part 1 to Django 2.0 routing syntax (#5963) Update tutorial to Django 2.0 routing syntax (#5963) May 5, 2018
@chrisshyi
Copy link
Contributor Author

chrisshyi commented May 5, 2018

Finished updating all tutorial pages to Django 2.0 routing syntax

@lovelydinosaur
Copy link
Contributor

Yas! 😄

@lovelydinosaur lovelydinosaur merged commit fc21432 into encode:master May 8, 2018
@lovelydinosaur lovelydinosaur changed the title Update tutorial to Django 2.0 routing syntax (#5963) Update tutorial to Django 2.0 routing syntax May 8, 2018
@stooj
Copy link

stooj commented Jun 21, 2018

Hi @chrisshyi - I found one last url that was missed: https://github.com/encode/django-rest-framework/blob/master/docs/tutorial/6-viewsets-and-routers.md

It's in the "Using Routers" section:

# The API URLs are now determined automatically by the router.
urlpatterns = [
    url(r'^', include(router.urls))
]

@chrisshyi
Copy link
Contributor Author

chrisshyi commented Jun 21, 2018

Thanks @stooj - I've updated the file just now and created a pull request.

pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull request Nov 17, 2020
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