Created
April 14, 2014 22:08
-
-
Save vkolev/10686200 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import render_template | |
from flask.ext.classy import FlaskView | |
from flask import jsonify | |
from app.models import Make | |
class IndexView(FlaskView): | |
route_base = '/' | |
def index(self): | |
user = {'username': "Vladimir"} | |
return render_template("index.html", | |
title="Home", | |
user=user) | |
def hello(self): | |
model = Make.query.filter_by(id=123).first() | |
return jsonify(model) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment