def show_all(self, Request):
        """ Display all posts in blog editor """

        if not Auth(Request).user():
            Request.redirect('dashboard')

        posts = Post.all()

        return view('dashboard/blog', {
            'author': User,
            'Auth': Auth(Request),
            'posts': posts
        })
 def index(self, view: View):
     return view.render('blog.post.index', {
         'posts': Post.all()
     })
Exemple #3
0
 def show(self, view: View):
     # открытие всех постов
     posts = Post.all()
     return view.render('posts', {'posts': posts})
    def show(self):
        posts = Post.all()

        return view('posts',{'posts': posts})
Exemple #5
0
    def show(self, view: View):
        posts = Post.all()

        return view.render('posts', {'posts': posts})
 def show(self, view: View):
     return Post.all()