server/authentication/urls.py
author rougeronj
Thu, 02 Apr 2015 11:57:39 +0200
changeset 51 032280909e65
child 61 5abd0a9eafbc
permissions -rw-r--r--
add authentication module using Token Auth
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
51
032280909e65 add authentication module using Token Auth
rougeronj
parents:
diff changeset
     1
from django.conf.urls import patterns, url
032280909e65 add authentication module using Token Auth
rougeronj
parents:
diff changeset
     2
from rest_framework.authtoken import views
032280909e65 add authentication module using Token Auth
rougeronj
parents:
diff changeset
     3
032280909e65 add authentication module using Token Auth
rougeronj
parents:
diff changeset
     4
from authentication.views import User, AuthView
032280909e65 add authentication module using Token Auth
rougeronj
parents:
diff changeset
     5
032280909e65 add authentication module using Token Auth
rougeronj
parents:
diff changeset
     6
032280909e65 add authentication module using Token Auth
rougeronj
parents:
diff changeset
     7
urlpatterns = patterns('',
032280909e65 add authentication module using Token Auth
rougeronj
parents:
diff changeset
     8
    url(r'^user', User.as_view()),
032280909e65 add authentication module using Token Auth
rougeronj
parents:
diff changeset
     9
    url(r'^auth', AuthView.as_view(), name='auth-view'),
032280909e65 add authentication module using Token Auth
rougeronj
parents:
diff changeset
    10
    url(r'^api-token-auth', views.obtain_auth_token)
032280909e65 add authentication module using Token Auth
rougeronj
parents:
diff changeset
    11
)