diff options
| author | Tom Christie | 2014-08-19 16:15:48 +0100 |
|---|---|---|
| committer | Tom Christie | 2014-08-19 16:15:48 +0100 |
| commit | 390061bed0991892dfa6c9b953fffc1bd15564a9 (patch) | |
| tree | 19b77e0e7b2c3559e7a427196364e7d1060b08b5 /rest_framework/urls.py | |
| parent | e385a7b8eb6e538698f28128e43fe8bfaefd4e97 (diff) | |
| parent | 2d2737f367c241c29c9c3913f2dba986c7c9a4a5 (diff) | |
| download | django-rest-framework-390061bed0991892dfa6c9b953fffc1bd15564a9.tar.bz2 | |
Merge pull request #1780 from tomchristie/pytest-tweaks
Added `runtests.py` and `flake8` code linting.
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') ) |
