def projects_all(): projects = db.find_all({}, collection='projects') return render_template('projects.html', projects=projects)
def all_posts(): query = request.args.get('query') posts = reversed(db.find_all()) return render_template('archive.html', query=query, posts=posts)