aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/authtoken/urls.py
blob: 2a3e81150aa97ae8571d1ec4c82ba115850f2dd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""
Login and logout views for token authentication.

Add these to your root URLconf if you're using token authentication
your API requires authentication.

The urls must be namespaced as 'rest_framework', and you should make sure
your authentication settings include `TokenAuthentication`.

    urlpatterns = patterns('',
        ...
        url(r'^auth-token', include('rest_framework.authtoken.urls', namespace='rest_framework'))
    )
"""
from django.conf.urls.defaults import patterns, url
from rest_framework.authtoken.views import AuthTokenView

urlpatterns = patterns('rest_framework.authtoken.views',
    url(r'^login/$', AuthTokenView.as_view(), name='token_login'),
#    url(r'^logout/$', 'token_logout', name='token_logout'),
)