mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 04:50:12 +03:00
Clarified intention of the first code example.
This commit is contained in:
parent
73c38b0bcb
commit
670a78536f
|
@ -21,7 +21,7 @@ Here's an example of a simple URL conf, that uses `SimpleRouter`.
|
|||
router.register(r'accounts', AccountViewSet)
|
||||
urlpatterns = router.urls
|
||||
|
||||
A more common usage of routers is
|
||||
A more common usage of routers is to include it in order to combine it with other patterns.
|
||||
|
||||
from django.conf.urls import patterns, include, url
|
||||
from rest_framework import routers
|
||||
|
@ -31,6 +31,7 @@ A more common usage of routers is
|
|||
router.register(r'accounts', AccountViewSet)
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^forgot-password/$, ForgotPasswordFormView.as_view(),
|
||||
url(r'^', include(router.urls))
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user