Skip to content

hack4impact-calpoly/calpoly-cat-program

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cal Poly Cat Program

A cat directory made for the Cal Poly Cat Program (CPCP)

The Cal Poly Cat Program (CPCP) is a non-profit organization of students, faculty, staff and community members who care about the health and happiness of both feral and domesticated cats. This software was made to decrease logistical friction (they were using paper filing and a large excel sheet) so they could focus on helping the cats. This site is currently live here.

There is also an accompanying mobile app for this site! The repository can be found here.

The Team

Getting Started

The web portion of this application was made in Django. The following will assume you have Python, Django, and pip installed.

  1. Clone the repo git clone https://github.com/hack4impact-calpoly/calpoly-cat-program
  2. Install postgresql    [ Mac OS | Windows | Linux ]
  3. Move into the directory by using cd calpoly-cat-program and install the dependancies pip install -r requirements.txt
  4. Configure the environment variables in .defaultenv and rename it to .env
  5. From the command line, run python manage.py migrate, then python manage.py runserver
  6. Hopefully the site is up and you can visit it at localhost:8000

Deployment

This site is deployed on Heroku, which is nice because it is free, but not nice because it won't store files long term. To get around this, we use s3 for file storage. This should be fine because s3 is cheap.

Note: Deploying with static files on Heroku is difficult. Keep the server in DEBUG=True mode to counter this

To setup s3 file storage, do the following. This assumes you have an AWS account.

  1. Create an IAM user with the AmazonS3FullAccess policy attached
  2. Copy these credentials into your .env
  3. Create an S3 bucket and enable CORS
  4. Copy the bucket name to your .env file and change ISPROD to True
  5. Start the web server