Add example of blueprint module import
parent
5f882a3cd7
commit
7b41b43f11
1 changed files with 6 additions and 1 deletions
|
|
@ -378,9 +378,14 @@ Here is the `/app/__init__.py`
|
|||
return render_template('404.html'), 404
|
||||
|
||||
from app.users.views import mod as usersModule
|
||||
|
||||
app.register_blueprint(usersModule)
|
||||
|
||||
# Later on you'll import the other blueprints the same way:
|
||||
#from app.comments.views import mod as commentsModule
|
||||
#from app.posts.views import mod as postsModule
|
||||
#app.register_blueprint(commentsModule)
|
||||
#app.register_blueprint(postsModule)
|
||||
|
||||
now you can go in your root, activate your virtual env and run `python run.py` ... something like:
|
||||
|
||||
brice@Brice:~/Projects/dev$ . env/bin/activate
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue