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:
parent
1deed46d34
commit
2bc278ae92
5 changed files with 55 additions and 9 deletions
|
@ -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'),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue