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
        })
Ejemplo n.º 2
0
 def index(self, view: View):
     return view.render('blog.post.index', {
         'posts': Post.all()
     })
Ejemplo n.º 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})
Ejemplo n.º 5
0
    def show(self, view: View):
        posts = Post.all()

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