implement login and logout

- add LogoutView to dashboard app
- define logout URL pattern
- only use login view from django.contrib.auth.views instead of including all
  auth URLs
- change base template to support login/logout
- add template dashboard/user_dashboard.html
This commit is contained in:
Jan Dittberner 2015-01-17 15:42:47 +01:00
parent 1deed46d34
commit 2bc278ae92
5 changed files with 55 additions and 9 deletions

View file

@ -4,6 +4,7 @@ from django.conf.urls import patterns, url
from .views import (
IndexView,
LogoutView,
UserDashboardView,
)
@ -13,4 +14,6 @@ urlpatterns = patterns(
url(r'^$', IndexView.as_view(), name='dashboard'),
url(r'^user/(?P<slug>[\w0-9@.+-_]+)/$',
UserDashboardView.as_view(), name='customer_dashboard'),
url(r'^logout/',
LogoutView.as_view(), name='logout'),
)