Commits

Steven Kryskalla committed db7f8b9

_blueprint -> blueprint

since this is meant to be accessed from the outside, it shouldn't be prefixed by "_"

  • Participants
  • Parent commits 6120aef

Comments (0)

Files changed (5)

File demos/01-simplest/app.py

     currency='usd',
 ))
 
-app.register_blueprint(item._blueprint)
+app.register_blueprint(item.blueprint)
 
 ## main #######################################################################
 

File demos/02-two-items/app.py

 
 for name in items:
     item = ItemBP(name, *items[name])
-    app.register_blueprint(item._blueprint, url_prefix="/%s" % name)
+    app.register_blueprint(item.blueprint, url_prefix="/%s" % name)
 
 ## app ########################################################################
 

File demos/03-secure-download/app.py

     ),
     file_path=os.path.join(ROOT_DIR, "../secure/itemshop-docs.pdf"),
 )
-app.register_blueprint(item._blueprint)
+app.register_blueprint(item.blueprint)
 
 ## main #######################################################################
 

File docs/quickstart.rst

     payment, and some default arguments for the payment (e.g. the
     price)
   * mount the item blueprint on your app using
-    ``app.register_blueprint(item._blueprint, **options)``
+    ``app.register_blueprint(item.blueprint, **options)``
 
 * HTML and JS
 
 
 .. code-block:: python
 
-    app.register_blueprint(item._blueprint)
+    app.register_blueprint(item.blueprint)
 
 By default, this will mount the blueprint onto the root of your app ("/").
 Let's mount the blueprint somewhere else, so we don't override the existing view
 
 .. code-block:: python
 
-    app.register_blueprint(item._blueprint, url_prefix="/shop")
+    app.register_blueprint(item.blueprint, url_prefix="/shop")
 
 Now, run your application::
 

File itemshop/__init__.py

         bp = Blueprint('itemshop.%s' % name, __name__)
         for (name, (rule, options)) in self._routes.items():
             bp.add_url_rule(rule, name, getattr(self, name), **options)
-        self._blueprint = bp
+        self.blueprint = bp
 
     @bp_route('/')
     def index(self):