Started adding a basic account page.

This commit is contained in:
Raoul Snyman 2010-03-02 15:21:43 +02:00
parent 85f1515f82
commit ec49c6da34
4 changed files with 46 additions and 1 deletions

View File

@ -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}')

View File

@ -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'

View File

@ -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 {

View File

@ -0,0 +1,31 @@
<%inherit file="/base.mako"/>
<%include file="/flash.mako"/>
<div class="post">
<h2 class="title">My Account</h2>
<%include file="/errors.mako"/>
<form id="account-account" action="${h.url_for(controller=u'account', action=u'index')}" method="post">
<fieldset class="form-details">
<legend>Required Details</legend>
<div class="form-item">
<label for="account-nick">Nick:</label>
<input type="text" name="account-nick" id="account-nick" class="form-text" />
</div>
<div class="form-item">
<label for="account-email">E-mail:</label>
<input type="text" name="account-email" id="account-email" class="form-text" />
</div>
</fieldset>
<fieldset class="form-details">
<legend>Personal Details</legend>
<div class="form-item">
<label for="account-first_name">First Name:</label>
<input type="text" name="account-first_name" id="account-first_name" class="form-text" />
</div>
</fieldset>
<fieldset>
<div class="form-item">
<input type="submit" name="account-action" value="Save" class="form-button"/>
</div>
</fieldset>
</form>
</div>