0

Can we import blueprint object from another python flask file?

I created a blueprint object and want to use this in another file so to avoid large number of routes in single file but this is not working for me. Help me

26th Mar 2020, 6:01 PM
Hassan Bari Raza
Hassan Bari Raza - avatar
1 Antwort
0
try to encapsule the object blueprint in a pickle object (you need to import pickle and copy from google the load and save functions) you can put the blueprint object in a list of 1 element for example and save as a pickle item, and in other scripts load this pickle objects
11th Apr 2020, 9:50 AM
Vicente Gras Mas
Vicente Gras Mas - avatar