/005-web-application-AI-Factor-y

005-web-application-AI-Factor-y created by GitHub Classroom

Primary LanguagePython

Introduction

The repository contains a web app to manage a pet store. The following features are supported

  1. List of pets
  2. Sorting pets by various fields (clicking on the headers)
  3. Click on a pet id to see details.
  4. Edit the pet to be change description
  5. Edit the pet to change whether it's sold or not.
  6. Click on a tag in the details page to see only pets which have that tag.

Setting up

  1. Clone repository
  2. Create a virtualenv and activate it
  3. Install dependencies using pip install -r requirements.txt
  4. Setup application using python setup.py develop
  5. export FLASK_APP=petshop to set the application
  6. flask initdb to create the initial database
  7. flask run to start the app.

You can also, instead of running the app, run the tests using py.test

Tasks

The app is currently incomplete. These are marked in the source code using # TODO. These tasks have to be completed for the app to work.

  1. Enable sorting by all columns. Right now, only the id sorting works and all the other columns also sort by id.

  2. Description is not displayed in the pet details page. This should be inside a <p> tag with class description. So something like this

      <p class="description"> 
          Description here
       </p>
    
  3. It's not possible to mark a pet as sold now. This needs to be fixed.

  4. Clicking on a tag will show you a view similar to the homepage but with only the pets with that tag. This is not implemented now.