Book Image

Flask By Example

By : Gareth Dwyer
Book Image

Flask By Example

By: Gareth Dwyer

Overview of this book

This book will take you on a journey from learning about web development using Flask to building fully functional web applications. In the first major project, we develop a dynamic Headlines application that displays the latest news headlines along with up-to-date currency and weather information. In project two, we build a Crime Map application that is backed by a MySQL database, allowing users to submit information on and the location of crimes in order to plot danger zones and other crime trends within an area. In the final project, we combine Flask with more modern technologies, such as Twitter's Bootstrap and the NoSQL database MongoDB, to create a Waiter Caller application that allows restaurant patrons to easily call a waiter to their table. This pragmatic tutorial will keep you engaged as you learn the crux of Flask by working on challenging real-world applications.
Table of Contents (20 chapters)
Flask By Example
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Index

Setting up a new Git repository


We'll create a new Git repository for our new code base as, although some of the setup will be similar, our new project should be completely unrelated to our first one. If you need more help with this step, head back to Chapter 1, Hello, World!, and follow the detailed instructions in the Installing and using Git section. If you feel confident, check whether you can do this just with the following summary:

  • Head over to the website for Bitbucket, GitHub, or whichever hosting platform you used for the first project. Log in and create a new repository

  • Name your repository crimemap and take note of the URL you're given

  • On your local machine, fire up a terminal and run the following commands:

    mkdir crimemap
    cd crimemap
    git init
    git remote add origin <git repository URL>
    

We'll leave this repository empty for now as we need to set up a database on our VPS. Once we have the database installed, we'll come back here to set up our Flask project.