To use this role-based access control template
-
Clone this repository to local computer
-
Rename the directory to reflect the new project name
-
Delete .git folder
-
Create a new virtual environment
- Windows:
python -m venv ./venv
- Mac:
python3 -m venv ./venv
- Windows:
-
Activate the new virtual environment
- Windows:
.\venv\Scripts\activate
- Mac:
source ./venv/bin/activate
- Windows:
-
Install the dependencies
pip install -r requirements.txt
-
Make a new repository by running
git init
in the folder. -
Track all the files in the new local repository
git add .
-
Make the first commit of this new project
git commit -m 'first commit of <project name> from flask_template
-
On Github, create a new repository. DO NOT initialize it
-
Connect the local repository to the new Github repository
git remote add origin <<repository_URL>>
-
Create and change to a new local development branch
git checkout b development
-
Continue working with the project as you normally would.
[MongoDB Atlas] https://www.mongodb.com/cloud/atlas/
-
In the project root, create a new file named .env
-
You can get the Mongo connection should be completed with values from your database user in Atlas.
MONGO = "mongodb+srv://REPLACE_ME_WITH_YOUR_DATABASE_USER:REPLACE_ME_WITH_YOUR_DATABASE_USER_PASSWORD@cluster0.upbc3.mongodb.net/REPLACE_ME_WITH_YOUR_DATABASE_NAME?retryWrites=true&w=majority"
- Create a secret key. SECRET_KEY = "REPLACE_ME_WITH_YOUR_SECRET_KEY_HERE"