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.
Fork and clone the repository
First fork the project using GitHub, than clone it locally:
git clone https://github.com/<username>/pets.git cd pets
Configure your instance
The project configuration uses python-decouple to dynamically read environment variables and
If you want, you can get started by copying
cp contrib/sample-env pets/.env
Then you have to set following variables:
Basic Django settings
SECRET_KEY: Django's secret key
127.0.0.1, .localhost) Django's allowed hosts
DJANGO_SETTINGS_MODULE: In order to make development and deploy to production simpler there's two settings module;
pets.settings.devfor development and
postgres://username:password@server:port/database_name) Database URL
0) Django's database
SENDGRID_API_KEY: API key of you SendGrid account.
DEFAULT_FROM_EMAIL: The email address that will be used as the
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
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 manage.py test
Please, do not commit changes if any test fails. Ask for help here instead.