/Gallery

Django-based Personal gallery application that displays photos for others to see

Primary LanguagePython

Gallery

Description

Gallery A personal gallery application that displays photos for viewing, based on category


User Requirements

  1. View different photos that interest me.
  2. 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.
  3. Search for different categories of photos.
  4. Copy a link to the photo to share with my friends.
  5. View photos based on the location they were taken.

Features

  • Create and display photos based on categories
  • Django admin dashboard for adding & managing images, categories and location
  • Bootstrap image model and copy link button.
  • Filter images based on location.
  • search functionality based on image category.

Setup

Requirements

  • Python3

Cloning the repository

git clone https://github.com/wanjiiru/Gallery.git && cd Gallery

Creating a virtual environment

python3 -m virtualenv virtual
source virtual/bin/activate

Installing dependencies

pip3 install -r requirements

Prepare environmet variables

Create a .env file and add the following configutions to it

SECRET_KEY= #secret key will be added by default
DEBUG= #set to false in production
DB_NAME= #database name
DB_USER= #database user
DB_PASSWORD=#database password
DB_HOST="127.0.0.1"
MODE= # dev or prod , set to prod during production
ALLOWED_HOSTS='.localhost', '.herokuapp.com', '.127.0.0.1'

Database migrations

python manage.py migrate

Running Tests

python manage.py test 

Running the server

python manage.py runserver

Deploying to heroku

Refer to this guide: deploying to heroku

Set the configuration to production mode

Live Demo

The web app can be accessed from the following link:

Technology used

License (MIT License)

This project is licensed under the MIT Open Source license, (c) Wanjiiru