Modularizing your flask app

For complex and larger flask project, you probably want to structure you application well.

for example,



---> /tour

---> /user

For me, i rather put my starter code into instead of so clearly my intention are clearly shown.

Sample of my looks like this. This is where i reference my other controllers and hooked up into flask blueprint. Flask blueprint allow us to modularize our app.

Sample of my looks as follow :-

From line 10 and 11, you can see that i am importing my controllers and modularizing it.

My controllers typically looks like this :-

Now you can go and browse http://localhost:port/tour


Popular posts from this blog

ionic2 cordova build android - Unable resolve gradle 2.2.3

A quick tutorial for OWASP ZAP tool for beginners

OpenCover code coverage for .Net Core