mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 19:40:13 +03:00
Docs: Add necessary imports to usage example
Beginners (like myself) will get errors when using the examples without specifiying these imports
This commit is contained in:
parent
1c53fd3212
commit
3aa5dd405d
|
@ -118,6 +118,8 @@ Add `'rest_framework'` to your `INSTALLED_APPS` setting.
|
|||
|
||||
If you're intending to use the browsable API you'll probably also want to add REST framework's login and logout views. Add the following to your root `urls.py` file.
|
||||
|
||||
from django.conf.urls import url, include
|
||||
...
|
||||
urlpatterns = [
|
||||
...
|
||||
url(r'^api-auth/', include('rest_framework.urls'))
|
||||
|
|
Loading…
Reference in New Issue
Block a user