Requirements
Install
You can either use pip
to install or clone the project from github.
Using pip
:
pip install djangorestframework
Using git clone
:
git clone [email protected]:tomchristie/django-rest-framework.git
After installing, you need to add rest_framework
to your INSTALLED_APPS
settings.
INSTALLED_APPS = (
...
'rest_framework',
)
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.
urlpatterns = [
...
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
]