To run locally:
.env.sample
in the root directory and name it .env
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.13
To check for all available Python versions:
pyenv versions
pipenv shell
pipenv install
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 migrate
python3 manage.py createsuperuser --email admin1@gmail.com --username admin1
python3 manage.py createsuperuser --email admin2@gmail.com --username admin2
enter your password for the NEW SUPER USER twice
python3 manage.py loaddata LIST_DATA_TO_LOAD
python3 manage.py runserver
To login navigate to: http://127.0.0.1:8000/admin
python3 manage.py migrate