Pets is a Django-based website that allows people to share photos and information about missing pets and pets available for adoption
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
contrib add sendgrid Nov 9, 2017
pets fix facebook sdk method call Sep 11, 2018
.codeclimate.yml Enhance CI settings (avoid the need to manually add new apps) Jul 20, 2016
.coveragerc Enhance CI settings (avoid the need to manually add new apps) Jul 20, 2016
.pre-commit-config.yaml add pre-commit and isort Aug 4, 2018
.pyup.yml trying to reduce the pyup noise Feb 6, 2018
.travis.yml add chrome addon Aug 4, 2018
LICENSE Add LICENSE Apr 14, 2015
Makefile update packages, add make test command Sep 7, 2018
Pipfile add pre-commit and isort Aug 4, 2018
Pipfile.lock update packages, add make test command Sep 7, 2018 add pre-commit and isort Aug 4, 2018



Code Climate Build Status Coverage Status Updates

Pets is a website where people can publish lost pets and pets available for adoption.

Users can create an account with a username and password, or they can use their Twitter and Facebook to login. You can also extend it to use other providers as it's backed by python-social-auth.

Images uploaded by users are cropped with easy-thumbnails to improve the site performance.



  • Python 3.6 or newer
  • PostgreSQL running with a database, username and password to be used with Pets.

Fork and clone the repository

First fork the project using GitHub, than clone it locally:

git clone<username>/pets.git
cd pets

Configure your instance

The project configuration uses python-decouple to dynamically read environment variables and .env files.

If you want, you can get started by copying contrib/sample-env as .env:

cp contrib/sample-env pets/.env

Then you have to set following variables:

Basic Django settings

  • SECRET_KEY: Django's secret key
  • ALLOWED_HOSTS (e.g., .localhost) Django's allowed hosts
  • DJANGO_SETTINGS_MODULE: In order to make development and deploy to production simpler there's two settings module; for development and for production.


Email configuration

  • SENDGRID_API_KEY: API key of you SendGrid account.
  • DEFAULT_FROM_EMAIL: The email address that will be used as the from email field.


If you want to login via social media, you will have to create apps as a developer at Facebook and/or Twitter. Once you're done, set the app secret and app key for each of them:


Other dependencies

Install Pillow dependencies

As Pets uses Pillow, some extra packages are needed. In a Debian based Linux this should do the job:

sudo apt-get install python-dev python3.x-dev libjpeg8-dev

Download ChromeDriver

You just need to download and unzip the latest ChromeDriver and place it somewhere in your search path.

Install Python packages

You can install the required packages with pipenv.

pipenv install --dev


Execute all tests, it will take some minutes.

cd pets
python test

Please, do not commit changes if any test fails. Ask for help here instead.