This is another version of our FeelsApp with an updated and more modular structure of the app.
Also, this app was created with flask via virtualenv following tutorials created by Lalith Polepeddi before being modified. - P.s: Thanks Lalith!
Here are some linux-based commands required to have the app set up for development.
If you're running Windows, follow the "Installation Instructions" on this link to get easy_install up and running on your computer.
If you already have virtualenv installed on your system, you will see a version number. Do the following command to check:
$ sudo easy_install virtualenv
or:
$ sudo pip install virtualenv
or:
$ sudo apt-get install python-virtualenv
After installing virtualenv, do the following command:
$ virtualenv flaskapp
This creates a new isolated development environment in your current directory.
Then, make the new dev-env your present working directory like so:
$ cd flaskapp
$ . bin/activate
Finally, install Flask:
$ pip install Flask
Here are some additional flask components/frameworks that must be installed to have the app working correctly after cloning this git later:
$ pip install flask-wtf
$ pip install flask-mail
$ pip install flask-sqlalchemy
$ pip install mysql-python
You may also need to install mysql to have a database running.
First, check to see if your system already has MySQL:
$ mysql --version
If the command was not found, you'll need to install MySQL.
There are several ways to do so. You may follow the instructions below:
- Via Homebrew (Avialable for linux based machines):
- type the following command to install Homebrew.
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent com/Homebrew/install/master/install)"
Hit agree to install and then hit return to continue in the terminal when prompted.
- After Homebrew is installed, do the two following commands to check if homebrew has been successfully installed, then get commonly used packages:
$ brew doctor
$ brew install wet
- Finally, install mysql:
$ brew install mysql
- Install via apt-get commands, like such:
$ sudo apt-get install mysql-server mysql-client
You may clone this git to your isolated development flaskapp folder
.
To continue developing this app in an isolated environment in the flaskapp folder
, remember to always do the following command:
$ . bin/activate
To have the contact page notify you at your personal email address, remember to change the following lines in __init__.py to an actual existing email login info.
app.config["MAIL_USERNAME"]='your-username@gmail.com'
app.config["MAIL_PASSWORD"]='your-password'