To run locally:
- Make a copy of the
.env.samplein the root directory and name it.env - Get the private keys from another engineer if you cannot access MAKE A LINK
Install pipenv if you do not currently have it. This will allow you to install the version of python this project is using.
You will want to have the correct Python version on your machine.
First, check your python version:
-
python --version
Install Pyenv if not installed
-
brew install pyenv
If using bash:
-
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bash_profile echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile
If using Zsh:
-
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.zshrc echo 'eval "$(pyenv init --path)"' >> ~/.zshrc
Remember to restart your terminal or run source ~/.bash_profile or source ~/.zshrc to apply the changes.
Once pyenv is installed, you can install different Python versions using it. For example, to install Python 3.9.13, you can run:
pyenv install 3.9.13To check for all available Python versions:
pyenv versionspipenv shellpipenv install- Create a secret key for the .env
python3 -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'This will create a local db
python3 manage.py migratepython3 manage.py createsuperuser --email admin1@gmail.com --username admin1
python3 manage.py createsuperuser --email admin2@gmail.com --username admin2enter your password for the NEW SUPER USER twice
python3 manage.py loaddata LIST_DATA_TO_LOADpython3 manage.py runserverTo login navigate to: http://127.0.0.1:8000/admin
python3 manage.py migrate- make sure that you are in the shell environment