diff --git a/source/tutorial/write-a-tumblelog-application-with-flask-mongoengine.txt b/source/tutorial/write-a-tumblelog-application-with-flask-mongoengine.txt index 218ed36a018..ade26f59d0e 100644 --- a/source/tutorial/write-a-tumblelog-application-with-flask-mongoengine.txt +++ b/source/tutorial/write-a-tumblelog-application-with-flask-mongoengine.txt @@ -84,15 +84,15 @@ Install with the following commands: pip install flask pip install flask-script pip install WTForms - pip install https://github.com/hmarr/mongoengine/tarball/dev - pip install https://github.com/rozza/flask-mongoengine/tarball/master + pip install mongoengine + pip install flask_mongoengine Continue with the tutorial to begin building the "tumblelog" application. .. _WTForms: http://wtforms.simplecodes.com/docs/dev/ .. _Flask-Script: http://pypi.python.org/pypi/Flask-Script -.. _Flask-MongoEngine: http://github.com/rozza/flask-mongoengine +.. _Flask-MongoEngine: http://github.com/MongoEngine/flask-mongoengine Build a Blog to Get Started --------------------------- @@ -120,7 +120,7 @@ provides a development server and shell: import os, sys sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) - from flaskext.script import Manager, Server + from flask.ext.script import Manager, Server from tumblelog import app manager = Manager(app) @@ -157,10 +157,11 @@ Install the Flask_ extension and add the configuration. Update .. code-block:: python from flask import Flask - from flaskext.mongoengine import MongoEngine + from flask.ext.mongoengine import MongoEngine app = Flask(__name__) app.config["MONGODB_DB"] = "my_tumble_log" + app.config["SECRET_KEY"] = "KeepThisS3cr3t" db = MongoEngine(app) @@ -203,6 +204,7 @@ In this application, you will define posts and comments, so that each return self.title meta = { + 'allow_inheritance': True, 'indexes': ['-created_at', 'slug'], 'ordering': ['-created_at'] } @@ -442,7 +444,7 @@ and the :py:class:`DetailView` class to this file: .. code-block:: python - from flaskext.mongoengine.wtf import model_form + from flask.ext.mongoengine.wtf import model_form ... @@ -501,7 +503,7 @@ create comments. Create a macro for the forms in {% macro render(form) -%}