Git Product home page Git Product logo

zoo-gram's Introduction

zoo-gram

a Django clone of the website for the popular photo app Instagram.

forthebadge made-with-python

User stories

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

  1. Sign in to the application to start using. ✔️
  2. Upload my pictures to the application. ✔️
  3. See my profile with all my pictures. ✔️
  4. Follow other users and see their pictures on my timeline. ✔️
  5. Like a picture and leave a comment on it. ✔️

Feature A: Image Model ✔️

Your Project should contain an Image model with the following properties:

  1. Image
  2. Image Name.
  3. Image Caption.
  4. Profile Foreign key
  5. Likes
  6. Comments

Feature B: Profile model ✔️

Create the Profile model with the following properties:

  • Profile Photo
  • Bio
  • Remember to make migrations to your database when you change the properties of the model.

Feature C: Image Model methods

Your Image model should contain at least the following methods:

  • save_image() - Save an image to the database.
  • delete_image() - Delete image from the database.
  • update_caption() - Update image caption in the database.

You should write tests for each of these methods and make sure you implement error handlers to prevent your application from crashing.

Feature D: Profile model methods.

  • You must implement the save, update and delete methods in the models.
  • Make sure you write tests for each method

Feature E: Search Functionality

Your project must have a search form that when submitted calls a search function in the view function and redirects to a search results page.

Feature F: Image Details

When a user clicks on an Image he/she should be redirected to where the image is displayed and should also see the details of the Image.

Feature H: an Authentication system

Your application should have a solid authentication system that allows users to sign in or register into the application before using it. When a user registers with your application they should receive a confirmation email.

Showcase

screenshot of app running

Live Site

link to deployed site

Setup Instructions / Installation

Getting Started

Prerequisites

  • Python and pip (I am currently using 3.9.7) 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-gram
  2. Change into the folder

    cd zoo_gram
  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_gram
    

    3b. Activate the virtualenv

    pyenv activate zoo_gram
    
  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

    5a. Create a free cloudinary account and get your credentials to enable photo uploading deployed.

    OR

    5b. Uncomment line 15 and line 57 in z_gram/models.py to save and serve images locally.

  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.7
  • Django web framework
  • PostgreSQL
  • Cloudinary
  • 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.

zoo-gram's People

Contributors

kenmwaura1 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

mehtaharsh15

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.