This is an ongoing project for football pools, where you can join different pools with your own predictions and monitor the results. It also includes an admin side where administrators can enter results and manage users.## Table of Contents
First, clone the repository to your local machine.
git clone https://github.com/yourusername/gansa.git
cd gansa
Create a virtual environment to manage dependencies. You can use venv
:
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Use the package manager pip to install the requirements.
pip install -r requirements.txt
Create a database in PostgreSQL. You can do this using psql
:
CREATE DATABASE gansa;
CREATE USER gansa_user WITH PASSWORD 'yourpassword';
ALTER ROLE gansa_user SET client_encoding TO 'utf8';
ALTER ROLE gansa_user SET default_transaction_isolation TO 'read committed';
ALTER ROLE gansa_user SET timezone TO 'UTC';
GRANT ALL PRIVILEGES ON DATABASE gansa TO gansa_user;
Create a .env
file in the root directory of the project and add your database credentials and other variables:
DB_NAME=gansa
DB_USER=gansa_user
DB_PASS=yourpassword
DB_HOST=localhost
DB_PORT=5432
DEBUG=1 # Use 0 for production
STAGE=dev # Use prod for production
Run all migrations to set up the database schema.
python manage.py migrate
Create a superuser to access the Django admin interface.
python manage.py createsuperuser
Run the local Django server.
python manage.py runserver
The current tournament ID is hardcoded in the project. You might need to update this manually based on your needs.
The majority of the game logic can be found in the gameInput.html
file. Make sure to review this file for any specific game-related logic and updates.