def get(self): visitor.register(self.request) data={ 'options' : models.getConfig(), 'history' : models.getLastEntries(20) } path = os.path.join(os.path.dirname(__file__),view) self.response.out.write(template.render(path,data))
def get(self): installed=True check=models.getConfig(); if not check: conf=newconfig() post=newpost() installed=False self.redirect("/")
def post(self): visitor.register(self.request) data={ 'options':models.getConfig(), 'post':{ 'title':self.request.get('xtitle'), 'content':self.request.get('xcontent') } } path=os.path.join(os.path.dirname(__file__),view) self.response.out.write(template.render(path,data))
def get(self): visitor.register(self.request) options=models.getConfig() entries=models.getLastEntries(10) updated=entries[0].date data={ 'blog' :options, 'updated':updated, 'entries':entries } path=os.path.join(os.path.dirname(__file__),view) self.response.out.write(template.render(path,data))