Пример #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))
Пример #2
0
 def get(self):
   installed=True
   check=models.getConfig();
   if not check: 
     conf=newconfig()
     post=newpost()
     installed=False
   self.redirect("/")
Пример #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))
Пример #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))