Exemple #1
0
 def get(self):
     # greeting = self.get_argument('greeting', 'Hello')
     # self.write(greeting + ', welcome you to read: www.itdiffer.com')
     # self.render("index.html")
     usernames = mrd.select_columns(table="users", column="username")
     one_user = usernames[0][0]
     self.render("index.html", user=one_user)
Exemple #2
0
 def get(self):
     # greeting = self.get_argument('greeting', 'Hello')
     # self.write(greeting + ', welcome you to read: www.itdiffer.com')
     # self.render("index.html")
     usernames = mrd.select_columns(table="users",column="username")
     one_user = usernames[0][0]
     self.render("index.html", user=one_user)
Exemple #3
0
    def get(self):
        usernames = mrd.select_columns(table="users",column="username,email")
        #one_user = usernames[0][0]
        one_user = usernames
	print "type(one_user)"
        self.render("index.html", user=one_user)
 def get(self):
     usernames = mrd.select_columns(table="users",column="username")
     one_user = usernames[0][0]
     self.render("index.html", user=one_user)
Exemple #5
0
 def get(self):
     user_infos = mrd.select_columns(table="news",column="*")
     self.render("list.html", new = user_infos)
Exemple #6
0
 def get(self):
     usernames = mrd.select_columns(table="users", column="username")
     one_user = usernames[0][0]
     self.render("index.html", user=one_user)
Exemple #7
0
 def get(self):
     username = mrd.select_columns(table="users", column="username")
     one_user = username[0][0]
     # 其中user=one_user的作用就是传递对象到模板
     self.render("index.html", user=one_user)
 def get(self):
     usernames = mrd.select_columns(table="users", column="username")
     one_user = usernames[0][0]
     self.render("index.html",
                 user=one_user)  #render() 函数的功能在于向请求者反馈网页模板,并且向模板中传递数值
Exemple #9
0
 def get(self):
     username = mrd.select_columns(table="users", column="username")
     one_user = username[0][0]
     # 其中user=one_user的作用就是传递对象到模板
     self.render("index.html", user=one_user)
Exemple #10
0
 def get(self):
     usernames = mrd.select_columns(table='users', column='username')
     one_user = usernames[0][0]
     self.render('index.html', user=one_user)  #反馈网页模板
Exemple #11
0
 def post(self):
     self.set_header("Content-Type", "application/json")
     user_infos = mrd.select_columns(table="user", column="*")
     self.write(json.dumps(user_infos))
Exemple #12
0
	def get(self):
                usernames = mrd.select_columns(table='users',column='username')
                one_user = usernames[0][0]
		self.render('index.html',user=one_user)