server/src/authentication/urls.py
author ymh <ymh.work@gmail.com>
Mon, 08 Jun 2015 00:50:40 +0200
changeset 133 c3c3e48b0603
parent 117 41a78460bdac
child 143 ea633c8f9bfa
permissions -rw-r--r--
Added tag V0.1-alpha.0 for changeset ca7e5ca8635c
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
61
5abd0a9eafbc custom ObtainToken function to add PopulateVisite function when a user connects
rougeronj
parents: 51
diff changeset
     4
from authentication.views import User, ObtainAuthToken
51
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()),
108
4a152f5f4a09 update user model to authenticate with the email as username
rougeronj
parents: 61
diff changeset
     9
    url(r'^api-token-auth', ObtainAuthToken.as_view()),
51
032280909e65 add authentication module using Token Auth
rougeronj
parents:
diff changeset
    10
)