From ec49c6da34e9236b98cc1d0e16ad97ac14a02c8e Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Tue, 2 Mar 2010 15:21:43 +0200 Subject: [PATCH] Started adding a basic account page. --- scribeengine/config/routing.py | 1 + scribeengine/controllers/account.py | 4 ++- scribeengine/public/styles/style.css | 11 ++++++++ scribeengine/templates/account/index.mako | 31 +++++++++++++++++++++++ 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 scribeengine/templates/account/index.mako diff --git a/scribeengine/config/routing.py b/scribeengine/config/routing.py index a5cbf09..3837749 100644 --- a/scribeengine/config/routing.py +++ b/scribeengine/config/routing.py @@ -51,6 +51,7 @@ def make_map(): map.connect('/tag/{id}', controller='blog', action='tag') map.connect('/calendar/{year}/{month}', controller='blog', action='calendar') + map.connect('/{controller}') map.connect('/{controller}/{action}') map.connect('/{controller}/{action}/{id}') diff --git a/scribeengine/controllers/account.py b/scribeengine/controllers/account.py index 93434de..3661fcf 100644 --- a/scribeengine/controllers/account.py +++ b/scribeengine/controllers/account.py @@ -39,8 +39,10 @@ log = logging.getLogger(__name__) class AccountController(BaseController): + @authenticate() def index(self): - h.redirect_to(h.url_for(controller=u'account', action=u'login')) + c.page_title = u'My Account' + return render(u'/account/index.mako') def register(self): c.page_title = u'Register' diff --git a/scribeengine/public/styles/style.css b/scribeengine/public/styles/style.css index 8a3f11a..1e0ed89 100644 --- a/scribeengine/public/styles/style.css +++ b/scribeengine/public/styles/style.css @@ -384,6 +384,17 @@ fieldset { padding: 0; } +fieldset.form-details { + background: url(../images/img05.gif) no-repeat left 1.5em; + padding: 13px 20px 0 20px; +} + +fieldset.form-details legend { + font-size: 1.2em; + margin-left: 0; + padding-left: 0; +} + .form-text, .form-password, .form-textarea { diff --git a/scribeengine/templates/account/index.mako b/scribeengine/templates/account/index.mako new file mode 100644 index 0000000..dca3fe6 --- /dev/null +++ b/scribeengine/templates/account/index.mako @@ -0,0 +1,31 @@ +<%inherit file="/base.mako"/> + <%include file="/flash.mako"/> +
+

My Account

+ <%include file="/errors.mako"/> +
+
+ Required Details +
+ + +
+
+ + +
+
+
+ Personal Details +
+ + +
+
+
+
+ +
+
+
+