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:
Johan Van de Wauw 2018-04-13 13:39:54 +02:00 committed by GitHub
parent 1c53fd3212
commit 3aa5dd405d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'))