from app import app
from app.models import Post
from flask import render_template


@app.route('/')
@app.route('/page/<int:page>')
def blog(page=1):
    """View the blog."""
    posts = Post.query.filter_by(visible=True) \
                      .order_by(Post.published.desc())
    if posts:
        pagination = posts.paginate(page=page, per_page=Post.PER_PAGE)
    return render_template('blog.html', pagination=pagination)


@app.route('/archive')
def archive():
    """View an overview of all visible posts."""
    posts = Post.query.filter_by(visible=True) \
                      .order_by(Post.published.desc())
    return render_template('archive.html', posts=posts)


@app.route('/<path:slug>', methods=['GET', 'POST'])
def detail(slug):
    """View details of post with specified slug."""
    post = Post.query.filter_by(visible=True, slug=slug) \
                     .first_or_404()
    return render_template('detail.html', post=post)

@@ -2,19 +2,21 @@
 rom 
-app
+flask
  import 
 app%0A
@@ -11,19 +11,43 @@
  import 
-app
+render_template, send_file%0A
 %0Afrom ap
@@ -51,23 +51,16 @@
  app
-.models
  import 
 Post
@@ -59,46 +59,39 @@
 ort 
-Post
+app
 %0Afrom 
-flask import render_template
+app.models import Post
 %0A%0A%0A@
@@ -953,8 +953,102 @@
 t=post)%0A
+%0A%0A@app.route('/admin')%0Adef admin():%0A    return send_file('static/admin-panel/app/index.html')%0A

Add route for admin panel