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
| def remove_animation | |
| manipulate! do |img, index| | |
| index == 0 ? img : nil | |
| end | |
| end |
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
| def remove_animation | |
| manipulate! do |img, index| | |
| index == 0 ? img : nil | |
| end | |
| end |
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 | |
| from post import Post | |
| from flask.ext.mongoengine import MongoEngine | |
| app = Flask(__name__) | |
| app.config["MONGODB_SETTINGS"] = {'DB': "FlaskBlog"} | |
| db = MongoEngine(app) | |
| if __name__ == '__main__': |
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 | |
| from flask.ext.mongoengine import MongoEngine | |
| app = Flask(__name__) | |
| app.config["MONGODB_SETTINGS"] = {'DB': "FlaskBlog"} | |
| db = MongoEngine(app) | |
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 | |
| from blog import models | |
| from flask.ext.mongoengine import MongoEngine | |
| app = Flask('blog') | |
| app.config["MONGODB_SETTINGS"] = {'DB': "FlaskBlog"} | |
| db = MongoEngine(app) | |
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 | |
| from blog.models import Post # ERROR. | |
| from flask.ext.mongoengine import MongoEngine | |
| app = Flask(__name__) | |
| app.config["MONGODB_SETTINGS"] = {'DB': "FlaskBlog"} | |
| db = MongoEngine(app) | |
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
| #. |
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
| #In a folder named 'blog' | |
| from flask import Flask | |
| from blog import Post, User | |
| from flask.ext.mongoengine import MongoEngine | |
| app = Flask(__name__) | |
| app.config["MONGODB_SETTINGS"] = {'DB': "FlaskBlog"} | |
| db = MongoEngine(app) | |
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.ext.mongoengine import MongoEngine | |
| from flask import Flask | |
| from blog import controllers | |
| app = Flask('blog') | |
| app.config["MONGODB_SETTINGS"] = {'DB': "FlaskBlog"} | |
| db = MongoEngine(app) |
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.ext.mongoengine import MongoEngine | |
| from flask import Flask | |
| import blog.controllers | |
| app = Flask('blog') | |
| app.config["MONGODB_SETTINGS"] = {'DB': "FlaskBlog"} | |
| db = MongoEngine(app) |