Skip to content

Commit f593f57

Browse files
Update browsable-api.md (#9509)
* Update browsable-api.md Deprecated url(), use re_path(). Show imports. * Update docs/topics/browsable-api.md * Update docs/topics/browsable-api.md --------- Co-authored-by: Asif Saif Uddin <[email protected]>
1 parent 5cc1028 commit f593f57

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/topics/browsable-api.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ By default, the API will return the format specified by the headers, which in th
2020
To quickly add authentication to the browesable api, add a routes named `"login"` and `"logout"` under the namespace `"rest_framework"`. DRF provides default routes for this which you can add to your urlconf:
2121

2222
```python
23+
from django.urls import include, path
24+
2325
urlpatterns = [
2426
# ...
25-
url(r"^api-auth/", include("rest_framework.urls", namespace="rest_framework"))
27+
path("api-auth/", include("rest_framework.urls", namespace="rest_framework"))
2628
]
2729
```
2830

0 commit comments

Comments
 (0)