Get Together

Build Status

Get Together is an open source event manager for local communities.

Try it free at https://gettogether.community

Goals

Stack

This project has been built using Django 2 and Python 3.

For more details on dependencies, please check requirements.txt.

Getting Started

Install Git

First, make sure you have Git already installed.

It usually comes pre-installed in Mac and Linux but in Windows you need to run the installer available in the link above.

Install virtualenv

Also make sure you have virtualenv in your computer by running:

virtualenv --version

If you get an error, use pip (included in Python3) with the following command:

pip install virtualenv

Configure your local repository

If you haven't already, fork the project at https://github.com/GetTogetherComm/GetTogether

Clone your forked repository in your computer (see detailed instructions here).

Navigate to the repository's location using the command line: cd GetTogether

Add https://github.com/GetTogetherComm/GetTogether.git to remote following these instructions.

Configure the virtual environment

virtualenv ./env
virtualenv --python=python3 ./env

Install dependecies and migrate the database

./env/bin/pip install -r requirements.txt
./env/bin/python manage.py migrate
./env/Scripts/pip install -r requirements.txt
./env/Scripts/python manage.py migrate

Rename the local_settings file

Find the file local_settings.example and copy it in local_settings.py with the following command:

cp local_settings.example local_settings.py

Create a super user

./env/bin/python manage.py createsuperuser
winpty ./env/Scripts/python manage.py createsuperuser

Start the server

./env/bin/python manage.py runserver
winpty ./env/Scripts/python manage.py runserver

Installing pre-commit hooks

Pre-commit is a tool that helps us commiting better code. Before writing any code first install the hooks to your repo.

./env/bin/pre-commit install
./env/Scripts/pre-commit install

From now on everytime you commit some code this will be checked by our pre-commit hooks.

Code formatters

We use the following code formatters:

They are included in the requirements.txt so they were installed already when you installed dependencies.

On the first commit after installing pre-commit, Black and iSort it will create a new environment, which may take a few minutes. This environment will be reused for all subsequent commits.

Loading City data

In order to make it easier to create Places and Teams without having to manually enter records for Country, SPR (State/Province/Region) and City, you can preload them using data files from http://download.geonames.org/export/dump/

The provided load_spr and load_cities commands will only load data if the parent country (or SPR for cities) exists in the database. This lets you choose whether you want to load every city, only cities for select countries, or only for select SPRs.

Countries

Download the countryInfo.txt file from GeoNames, then run:

./env/bin/python manage.py load_countries countryInfo.txt

SPR

Download the admin1CodesASCII.txt file from GeoNames, then run:

./env/bin/python manage.py load_spr admin1CodesASCII.txt

Cities

You have a few choices for City data files. GeoNames provides data files for cities with more than 15,000 residents, cities with more than 5,000 residents, and cities with more than 1,000 residents. The smaller the number, the more cities there will be in the data file (and the longer it will take to import them all).

Download the file you want from the links above. They will be zip files that you must unzip before using. Then import the cities by running (for your downloaded file):

./env/bin/python manage.py load_cities cities15000.txt

Using docker

docker build -t get_together .
docker run -e "DEBUG_MODE=True" -e "SECRET_KEY=xxxxx" -e "ALLOWED_HOSTS=localhost,127.0.0.1" -d --name get_together -p 8000:8000 get_together
docker exec -it get_together venv/bin/python manage.py createsuperuser

Using docker-compose

docker-compose up -d
docker-compose exec get_together python3 manage.py createsuperuser

You can then connect to the container by going to localhost:8000

Test Federation

You can import live event data into your "Searchable" table with this command:

./env/bin/python manage.py import https://gettogether.community/searchables/

Getting Involved

To contribute to Get Together, you can file issues here on GitHub, work on features you want it to have, or contact us on Telegram to learn more.

Currently the project needs:

If you can help with any of these, please get in touch with me!