diff --git a/pgweb/account/urls.py b/pgweb/account/urls.py index a568eb90..4cfcb0ef 100644 --- a/pgweb/account/urls.py +++ b/pgweb/account/urls.py @@ -1,5 +1,5 @@ from django.conf.urls.defaults import * -from django.contrib.auth.views import logout_then_login +from django.contrib.auth.views import logout_then_login, login urlpatterns = patterns('', @@ -8,7 +8,10 @@ urlpatterns = patterns('', # News & Events (r'^news/(.*)/$', 'news.views.form'), (r'^events/(.*)/$', 'events.views.form'), - + + # Log in + (r'^login/$', login, {'template_name':'account/login.html'}), + # Log out (r'^logout/$', logout_then_login, {'login_url': '/' }), ) diff --git a/pgweb/account/views.py b/pgweb/account/views.py index 5064d3b4..77b62125 100644 --- a/pgweb/account/views.py +++ b/pgweb/account/views.py @@ -17,3 +17,4 @@ def home(request): 'events': myevents, }, NavContext(request, 'account')) + diff --git a/pgweb/settings.py b/pgweb/settings.py index 72a8382f..2518ccfb 100644 --- a/pgweb/settings.py +++ b/pgweb/settings.py @@ -70,6 +70,10 @@ TEMPLATE_DIRS = ( '../templates/', ) +LOGIN_URL='/account/login/' +LOGIN_REDIRECT_URL='/account/' +LOGOUT_URL='/account/logout/' + INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.contenttypes', diff --git a/templates/account/login.html b/templates/account/login.html new file mode 100644 index 00000000..490e73f2 --- /dev/null +++ b/templates/account/login.html @@ -0,0 +1,27 @@ +{%extends "base/page.html"%} +{%block contents%} +

Log in

+

+Please log in to your community account. +

+ +
+
+ +
+
+ + +
+
+ +
+
+ + + + +{%endblock%} +