Exemple #1
0
 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))
Exemple #2
0
 def get(self):
   installed=True
   check=models.getConfig();
   if not check: 
     conf=newconfig()
     post=newpost()
     installed=False
   self.redirect("/")
Exemple #3
0
 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))
Exemple #4
0
 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))