A second attempt at an online hour tracker for Talon Robotics using Django and Heroku
https://time-tracker-2502.herokuapp.com
Features basic sign in and out functionality, ability to see the hours for all team members, see the team members currently signed in, and export all hours to a CSV
- See "Installing Homebrew" here
brew install python postgresql
brew tap heroku/brew && brew install heroku
brew services start postgresql
- Login to Heroku using
heroku login
(DM me on slack for the credentials) - Add a Heroku Git remote by running
heroku git:remote -a time-tracker-2502
in the project's local directory - Enter psql using
psql postgres
(you can quit using\q
) - Create a password for your default user using
\password [your-username]
and quit postgres using\q
- Create a local PostgreSQL database using
CREATE DATABASE [your-database];
or follow instructions here to connect to production database - Ask me for the secret key
- Create local_settings.py in the same directory as settigns.py with your local PostgreSQL database settings and the secret key I gave you (see example below)
- Create a Python virtual environment and run
pip install -r requirements.txt
- If you are getting errors with psycopg2 you may need to run
pip install psycopg2-binary
Your local_settings.py file should like this if using a local instance of PostgreSQL
DEBUG = True
SECRET_KEY = '[secret-key]'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': '[your-database]',
'USER': '[your-username]',
'PASSWORD': '[your-password]',
'HOST': 'localhost',
'PORT': '5432', # Default port for PostgreSQL
}
}