Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/deejungx/goalza

Futsal booking management
https://github.com/deejungx/goalza

django python

Last synced: about 1 month ago
JSON representation

Futsal booking management

Awesome Lists containing this project

README

        

# Goalza

A futsal booking management system.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

### Prerequisites

* Python 3.7
* pip

### Installing

Use the package manager `pip` to install `pipenv`

```bash
pip install pipenv
```

Then install the requirements from Pipfile.lock

```bash
pipenv install
```

After installation is complete, start the virtual environment

```bash
pipenv shell
```
Now, to setup the database, install `postgresql` and `postgresql-contrib`

```bash
sudo apt-get install postgresql postgresql-contrib
```

Change user to the `postgres` Postgresql Administrative user

```bash
sudo su - postgres
```

Login to a Postgres session

```bash
psql
```

Create a database

```bash
CREATE DATABASE goalza;
```

Create a user and give a secure password

```bash
CREATE USER myprojectuser WITH PASSWORD 'password';
```

Setup some configuration for the user. Replace `myprojectuser` with your username

```bash
ALTER ROLE myprojectuser SET client_encoding TO 'utf8';
ALTER ROLE myprojectuser SET default_transaction_isolation TO 'read committed';
ALTER ROLE myprojectuser SET timezone TO 'UTC';
GRANT ALL PRIVILEGES ON DATABASE goalza TO myprojectuser;
```
Exit the sql prompt and postgres user shell

```bash
\q
exit
```

Update the database settings in `settings.py` file located inside `djangox_project` folder with your database name, username, and password.

```python
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'goalza',
'USER': 'myprojectuser',
'PASSWORD': 'mypassword',
'HOST': 'localhost',
'PORT': '',
}
}
```

Make the migrations and run it

```bash
python manage.py makemigrations
python manage.py migrate
```

Finally, run the local server with

```bash
python manage.py runserver
```

Go to [localhost](http://127.0.0.1:8000/ "localhost") to view the site.