Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- from flask import Blueprint, render_template, current_app
- from flaskext.mongokit import MongoKit
- from app.models.mongodb import Ref
- bp = Blueprint('references', __name__)
- #------------------------------------------------------------------------------
- @bp.route('/')
- def index():
- context = {}
- db = MongoKit(current_app)
- db.register([Ref])
- context['refs'] = db.Ref.find()
- return render_template('refs.html', c=context)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement