Created
June 10, 2013 21:25
-
-
Save pvanliefland/5752454 to your computer and use it in GitHub Desktop.
Flask view import problem
This file contains hidden or 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 Flask, request, render_template | |
import config, database | |
app = Flask(__name__) | |
app.debug = config.DEBUG | |
import views | |
if __name__ == "__main__": | |
app.run() |
This file contains hidden or 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 app import app | |
# Index page | |
@app.route("/", methods=['GET']) | |
def index(): | |
return render_template('index.html') | |
# Add picture page | |
@app.route("/add-picture", methods=['GET', 'POST']) | |
def add_picture(): | |
return render_template('add_picture.html') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment