Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
import settings
from werkzeug.contrib.fixers import ProxyFix
from flask import Flask, render_template
# from models import Post
from posts import Post
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
def index():
# posts = Post.objects().order_by("-publish_date")
posts = Post.all()
source = render_template('index.html', posts=posts)
return render_template('index.html', source=source, posts=posts)
def post(post_slug):
p =
# source = render_template('detail-no-content.html', post=p)
# return render_template('detail.html', source=source, post=p)
return render_template('detail.html', post=p)
if __name__ == '__main__':
app.debug = settings.DEBUG
app.secret_key = settings.SECRET"", port=settings.PORT)