A Flask web application that can handle logins, registration, forgotten passwords, profile edits, password changes, and DoS attacks.
Please make sure that these are installed:
- Python 2.7.x
- Python virtualenv
- Flask
- Flask-Login
- Flask-Mail
- Flask-SQLAlchemy
- Flask-WTF
- Python pyOpenSSL
- Python decorator
- Python passlib
- Python sqlalchemy-migrate
- Python libffi-dev
- Twitter Bootstrap
- jQuery
-
Download and unzip the files in a folder of your choice.
-
Go into the directory.
-
Ensure that pip is installed. For Windows users, see here for instructions.
- If you will have multiple versions of Python, check out how to install and configure and how to use pip with another version of Python.
-
Ensure that non-Python dependencies required for the
cryptography
package are installed. For Debian/Ubuntu users:sudo apt-get install build-essential libssl-dev libffi-dev python-dev
. For Windows users, install the latest version of OpenSSL here. AddC:\OpenSSL-Win64\bin
to your PATH environment variable. -
Ensure that the
virtualenv
module for Python is installed. Typepip freeze
into terminal and check ifvirtualenv
is listed.- If it is, update it to the most recent version by typing
sudo pip install --upgrade virtualenv
. - If not, simply type into terminal
sudo pip install virtualenv
for Linux and OSX users, orpip install virtualenv
for Windows users,pip2.7 install virtualenv
if you have multiple versions. - Note: virtualenv version 1.11.x may not work; install
virtualenv==1.10.1
in this case.
- If it is, update it to the most recent version by typing
-
Create a virtual environment. Type into terminal
virtualenv [the name you want]
without the brackets,virtualenv --python=[path/to/python/python.exe] [the name you want]
if you have multiple versions. -
Activate the virtual environment. For Linux users, type into terminal
. [name of virtual env]/bin/activate
. For Windows users, type[name of virtual env]\Scripts\activate
. -
Windows users ONLY. This is to install
cryptography
. Runpip install wheels
. Runpip install --use-wheel cryptography
. -
Retrieve all the requirements. Run
pip install -e .
to automatically install the needed dependencies. -
Generate your own SSL keys. Run
python ssl_create.py
and enter in the information to your liking.- Since this is a test application, it does not really matter what you enter in. However, make sure that you do not enter in a password.
-
Create the database. Run
python db_create.py
to create your database with the name specified in config.py. -
Start the server. Run
python run.py
and enjoy.
In templates/layout.html
and in the various email text templates, change the organization name to your organization's name in the footers.
In config.py
, you may change your database name; SSL certificate pointers; secret keys (used for encrypting emails); mail settings (necessary for the app to send forgot-password, account-verification emails); email link expiry duration.
In run.py
, you may change your host and port numbers.