Started adding a basic account page.
This commit is contained in:
parent
85f1515f82
commit
ec49c6da34
@ -51,6 +51,7 @@ def make_map():
|
|||||||
map.connect('/tag/{id}', controller='blog', action='tag')
|
map.connect('/tag/{id}', controller='blog', action='tag')
|
||||||
map.connect('/calendar/{year}/{month}', controller='blog', action='calendar')
|
map.connect('/calendar/{year}/{month}', controller='blog', action='calendar')
|
||||||
|
|
||||||
|
map.connect('/{controller}')
|
||||||
map.connect('/{controller}/{action}')
|
map.connect('/{controller}/{action}')
|
||||||
map.connect('/{controller}/{action}/{id}')
|
map.connect('/{controller}/{action}/{id}')
|
||||||
|
|
||||||
|
@ -39,8 +39,10 @@ log = logging.getLogger(__name__)
|
|||||||
|
|
||||||
class AccountController(BaseController):
|
class AccountController(BaseController):
|
||||||
|
|
||||||
|
@authenticate()
|
||||||
def index(self):
|
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):
|
def register(self):
|
||||||
c.page_title = u'Register'
|
c.page_title = u'Register'
|
||||||
|
@ -384,6 +384,17 @@ fieldset {
|
|||||||
padding: 0;
|
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-text,
|
||||||
.form-password,
|
.form-password,
|
||||||
.form-textarea {
|
.form-textarea {
|
||||||
|
31
scribeengine/templates/account/index.mako
Normal file
31
scribeengine/templates/account/index.mako
Normal 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>
|
Reference in New Issue
Block a user