diff options
| author | Tom Christie | 2014-08-19 13:28:07 +0100 | 
|---|---|---|
| committer | Tom Christie | 2014-08-19 13:28:07 +0100 | 
| commit | bf09c32de8f9d528f83e9cb7a2773d1f4c9ab563 (patch) | |
| tree | 334c85c136fe1dc010f8d7860b9431b3a9d87e56 /rest_framework/urls.py | |
| parent | e385a7b8eb6e538698f28128e43fe8bfaefd4e97 (diff) | |
| download | django-rest-framework-bf09c32de8f9d528f83e9cb7a2773d1f4c9ab563.tar.bz2 | |
Code linting and added runtests.py
Diffstat (limited to 'rest_framework/urls.py')
| -rw-r--r-- | rest_framework/urls.py | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/rest_framework/urls.py b/rest_framework/urls.py index eed4bd14..8fa3073e 100644 --- a/rest_framework/urls.py +++ b/rest_framework/urls.py @@ -8,17 +8,19 @@ your API requires authentication:          ...          url(r'^auth', include('rest_framework.urls', namespace='rest_framework'))      ) -     +  The urls must be namespaced as 'rest_framework', and you should make sure  your authentication settings include `SessionAuthentication`.  """  from __future__ import unicode_literals  from django.conf.urls import patterns, url +from django.contrib.auth import views  template_name = {'template_name': 'rest_framework/login.html'} -urlpatterns = patterns('django.contrib.auth.views', -    url(r'^login/$', 'login', template_name, name='login'), -    url(r'^logout/$', 'logout', template_name, name='logout'), +urlpatterns = patterns( +    '', +    url(r'^login/$', views.login, template_name, name='login'), +    url(r'^logout/$', views.logout, template_name, name='logout')  ) | 
