M
M
Michael2015-08-21 09:29:13
Flask
Michael, 2015-08-21 09:29:13

How to split route functions of blueprints into different flask files?

Hello, there is bp

for example

crm = Blueprint('crm',__name__,template_folder='templates')

accordingly, routes are declared in the same file
@crm.route('blablabla')
and they work,
but if you create another file and import the crm variable there and do the same, then the url no longer exists
. ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2015-08-21
@EvilsInterrupt

Find Miguel's Flask book. He shows very well how to do what you want ;)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question