示例#1
0
 def get(self, post):
     request_logger(request)
     if post not in [i.get('path') for i in POST_CONTENT]:
         abort(404)
     for i in POST_CONTENT:
         if post == i.get('path'):
             return render_template('post.html', vars=i)
示例#2
0
 def get(self, page):
     request_logger(request)
     if page not in [i.get('path') for i in PAGE_CONTENT]:
         abort(404)
     for i in PAGE_CONTENT:
         if page == i.get('path'):
             return render_template('page.html', vars=i)
示例#3
0
 def get(self):
     request_logger(request)
     return render_template(
         "posts.html",
         content=sorted(
             POST_CONTENT, key=lambda x: x.get("published"), reverse=True
         ),
     )
示例#4
0
 def get(self):
     request_logger(request)
     return render_template('index.html')