Exemple #1
0
 def get(self, *args, **kwargs):
     posts = get_post_for(self.current_user)
     image_urls = [p.image_url for p in posts] # p.image_url即posts.image_url
     print(image_urls)
     print(image_urls)
     print(image_urls)
     self.render('index.html', images=image_urls)
Exemple #2
0
 def get(self, *args, **kwargs):
     # images_path = os.path.join(self.settings.get('static_path'),'uploads')  #图片的路径--static_path+upload(statci_path路径在Application里定义)
     # images = photo.get_imges(images_path)                                   #一个jpg图片路径的列表
     posts = get_post_for(
         self.current_user
     )  #current_user是get_current_user不为空时,则返回get_current_user
     image_urls = [p.image_url for p in posts]
     next = self.get_argument('next', '')
     self.render('index.html', images=image_urls, next=next)
Exemple #3
0
    def get(self, *args, **kwargs):
        posts = get_post_for(self.current_user)
        thumb_urls = [p.thumb_url for p in posts]

        next = self.get_argument('next', '')
        self.render(
            'explore.html',
            thumb=thumb_urls,
            next=next,
        )
Exemple #4
0
 def get(self, *args, **kwargs):
     # names = glob.glob('static/uploads/*.jpg')
     posts = get_post_for(self.current_user)
     self.render('index.html', posts=posts)
Exemple #5
0
 def get(self, *args, **kwargs):
     # print(self.settings.get('static_path'))
     posts = get_post_for(self.current_user)  # 改目录下图片文件组成的列表,含路径
     self.render('index.html', posts=posts)
Exemple #6
0
 def get(self):
     posts = account.get_post_for(self.current_user)
     thumb_urls = [p.thumb_url for p in posts]
     self.render('explore.html',
                 images=thumb_urls,
                 )
Exemple #7
0
 def get(self):
     posts = account.get_post_for(self.current_user)
     image_urls = [p.image_url for p in posts]
     self.render('index.html',
                 images = image_urls)
Exemple #8
0
 def get(self, *args, **kwargs):
     posts = get_post_for(self.current_user)
     thumb_urls = [p.thumb_url for p in posts]
     self.render('index.html', images=thumb_urls)