def home_for_user(username): if username != g.user.username: abort(401) bookmarklet = render_template('bookmarklet.js', root=request.host_url.rstrip('/')) annotations = Annotation.search(user=g.user.id, limit=20) stats = Annotation.stats_for_user(g.user) return render_template('user/home.html', user=g.user, bookmarklet=bookmarklet, annotations=annotations, stats=stats)
def annotations_index(): annotations = Annotation.search(limit=20) return render_template('401.html'), 401