Skip to content

mecoccaro/Gansa

Repository files navigation

Gansa

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

Installation

Step 1: Clone the Repository

First, clone the repository to your local machine.

git clone https://github.com/yourusername/gansa.git
cd gansa

Step 2: Create a Virtual Environment

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`

Step 3: Install Requirements

Use the package manager pip to install the requirements.

pip install -r requirements.txt

Step 4: Create a PostgreSQL Database

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;

Step 5: Configure Environment Variables

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

Usage

Step 1: Apply Database Migrations

Run all migrations to set up the database schema.

python manage.py migrate

Step 2: Create a Superuser

Create a superuser to access the Django admin interface.

python manage.py createsuperuser

Step 3: Run the Development Server

Run the local Django server.

python manage.py runserver

Additional Information

Hardcoded Tournament ID

The current tournament ID is hardcoded in the project. You might need to update this manually based on your needs.

Main Logic for Games

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.

Contributors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published