Git Product home page Git Product logo

pets's Introduction

Pets

Donate

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.

Installing

Requirements

  • 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 https://github.com/<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. 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.dev for development and pets.settings.prod for production.

Database

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.

OAuth

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:

  • SOCIAL_AUTH_FACEBOOK_KEY
  • SOCIAL_AUTH_FACEBOOK_SECRET
  • SOCIAL_AUTH_TWITTER_KEY
  • SOCIAL_AUTH_TWITTER_SECRET

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

Test

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.

pets's People

Contributors

dirtycoder avatar jllorencetti avatar cuducos avatar paulo-romano avatar themayarose avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.