Django project supporting Grandview FC. Use app for Django programmers who want to run a basic website for their local soccer/football club. Pulls data dynamically from Teamsnap.
The application primarily consists of:
- Django
- Bootstrap
- Python
-
This is a python + django application. To get started running locally, you'll need Python3 + Pip (package manager)
- Install Python: https://www.python.org/downloads/
- Install Pip:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python3 get-pip.py
- Install Pipenv (this is the newer package manager used by this project)
pip install pipenv
- Install Virtualenv (this is so you can install packages in a virtualenv rather than have them running globally)
pip install virtualenv
- Go to your favorite projects directory and clone this repo
- Create a virtualenv and activate it
python -m venv ./venv/ . ./venv/bin/activate
- This application has a handfull of applications that must be available in your PATH. While not required,
may cause errors during the next step if not installed. You can try to skip this step and return to it if the following command fails.
- tesseract - see .platform/hooks/postdeploy/install_tesseract.sh or google how best to install tesseract on your platform
- developer packages - see .ebextenstions/002_packages.config for packages installed in production by default
- Install project dependencies
sudo apt install python3-dev libmysqlclient-dev default-libmysqlclient-dev pipenv install
- This project uses pre-commit Black to ensure code formatting standards are adhered. Do not skip this step:
pre-commit install
-
setup .env by renaming .env.example and adding relevant keys, or receive .env file by contacting rob. The following commands will not work without a valid .env
-
Initialize a sqlite database
python manage.py migrate
- Initialize your database by editing initialize.py to match local credentials you'd like to use
python initialize.py
- Start the server
python manage.py runserver
- login by accessing https://localhost:8000/ Click Login, enter credentials specified in initialize.py