/zoo_pictures

A Django project that is a personal gallery application that you display your photos for others to see.

Primary LanguageHTMLMIT LicenseMIT

zoo_pictures

A Django project this week will be to develop a personal gallery application that you display your photos for others to see.

forthebadge made-with-python PyPI license Twitter

logo

User stories

As a user of the application I should be able to:

  • View different photos that interest me. ✔️
  • Click on a single photo to expand it and also view the details of the photo. The photo details must appear on a modal within the same route as the main page. ✔️
  • Search for different categories of photos. (ie. Travel, Food). ✔️
  • Copy a link to the photo to share with my friends. ✔️
  • View photos based on the location they were taken. ✔️

Showcase

Home page

homepage

Category Search results

search results

Images by Location

images by location

Image details Modal

image details

Live Site

link to deployed site

Setup Instructions / Installation

Getting Started

Prerequisites

  • Python and pip (I am currently using 3.9.6) Any version above 3.7 should work.
  • Git installed on your machine
  • Code editor/ IDE

Installation and Running the App

  1. Clone GitHub repository

    git clone https://github.com/KenMwaura1/zoo_pictures
  2. Change into the folder

    cd zoo_pictures
  3. Create a virtual environment

     python3 -m venv venv 
    • Activate the virtual environment
    source ./bin/activate
  • If you are using pyenv:

    3a. Create a virtualenv

    pyenv virtualenv zoo_pictures
    

    3b. Activate the virtualenv

    pyenv activate zoo_pictures
    
  1. Create a .env file and add your credentials

    touch .env 
    

    OR Copy the included example

    cp .env-example .env 
    
  2. Add your credentials to the .env file

  3. Migrate your database

    python manage.py migrate
  4. Install the required dependencies

    pip install -r requirements.txt
  5. Make the shell script executable

    chmod a+x ./run.sh
  6. Run the app

    ./run.sh

    OR run with python

    python manage.py runserver

Tests

  • To run the tests:

    python manage.py test

Technologies used

  • Python-3.9.6
  • Django web framework
  • Bootstrap(Material Bootstrap 4)
  • HTML5
  • CSS3

Author

Ken Mwaura

LICENSE

MIT License

Copyright (c) 2021 Kennedy Ngugi Mwaura

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so.