Esempio n. 1
0
 def get(self):
     articles = db.GqlQuery("SELECT * FROM Article ORDER BY created_at DESC limit 10")
     template_values = {
         'articles': articles,
     }
     view = BaseTemplate.render('template/my/list.html',template_values)
     self.response.write(view)
Esempio n. 2
0
 def get(self):
     template_values = {
         'test':'HelloWorld,WebApp2!',
         #'debug': self.uri_for('home'),
         'debug':'t',
     }
     view = BaseTemplate.render('template/index.html',template_values)
     self.response.write(view)
Esempio n. 3
0
 def get(self):
     template_values = {
         'test':'HelloWorldWebApp2!',
         'debug':'t',
     }
     self.response.write("Settings")
     view = BaseTemplate.render('template/index.html',template_values)
     self.response.write(view)
Esempio n. 4
0
 def get(self,ID = None):
     if ID == None:
         self.redirect_to('home')
     blog = Article.get_by_id(long(ID))
     template_values = {
         'blog': blog,
     }
     view = BaseTemplate.render('template/home/view.html',template_values)
     self.response.write(view)
Esempio n. 5
0
        def get(self,ID = None):
            blog = Article.get_by_id(long(ID))
            logging.debug(blog)
            if blog!=None:
                title = blog.title
                text = blog.text
                blogid = blog.key().id()
            else:
                title = "BlogTitleSample0"
                text = "BlogTextSample0"
                blogid = 1

            template_values = {
                'uri_for':self.uri_for,
                'blogTitle':title,
                'blogText':text,
                'blogid': blogid,
            }
            view = BaseTemplate.render('template/my/edit.html',
                                       template_values)
            self.response.write(view)
Esempio n. 6
0
 def get(self):
     template_values = {}
     view = BaseTemplate.render('template/session/login.html',
                                template_values)
     self.response.write(view)
Esempio n. 7
0
 def get(self):
     
     template_values = {}
     view = BaseTemplate.render('template/home/index.html',template_values)
     self.response.write(view)