Basecamp time reports for the Zemoga App Dev team.
- Connection with the basecamp API.
- Real time updates.
- Make all ids and key parameters as environment variables.
- Django administration for all the users and data.
- Date selector.
- No-SQL database connection.
- Have Python 2.7+ installed.
- Have PostgreSQL 9.4+ installed and running.
To use this project, follow these steps:
- Create a working Python Virtual Environment (
$ virtualenv my_env
) navigate to it and activate it ($ source bin/activate
) - Install Django (
$ pip install django -U
) - Clone the repository (
$ git clone https://github.com/NullSleep/Super-Fun-Time.git
) and navigate inside it. - Install the project requirements (
$ pip install -r requirements.txt
) - Collect the static files of the project (
$ python manage.py collectstatic
) - Set the PostgreSQL DB (see the PostgreSQL Database Configuration section)
- Run the project (
$ python manage.py runserver
)
To create a new database and user for the project do the following:
$ psql
$ CREATE DATABASE <db_name>;
$ CREATE USER <db_user_name> WITH PASSWORD '<my_password>';
$ ALTER ROLE <db_user_name> SET client_encoding TO 'utf8';
$ ALTER ROLE <db_user_name> SET default_transaction_isolation TO 'read committed';
$ ALTER ROLE <db_user_name> SET timezone TO 'UTC';
On the project settings.py change the DATABASES to this:
$ DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': '<db_name>',
'USER': '<db_user_name>',
'PASSWORD': '<my_password>',
'HOST': 'localhost',
'PORT': '',
}
}
Migrate the database changes:
$ python manage.py makemigrations
$ python manage.py migrate
Make sure PostgreSQL is running before trying to run the project.
Make sure you have installed the Heroku Toolbelt
$ git init
$ git add -A
$ git commit -m "Initial commit"
$ heroku create
$ git push heroku master
$ heroku run python manage.py migrate