The repository contains a web app to manage a pet store. The following features are supported
- List of pets
- Sorting pets by various fields (clicking on the headers)
- Click on a pet id to see details.
- Edit the pet to be change description
- Edit the pet to change whether it's sold or not.
- Click on a tag in the details page to see only pets which have that tag.
- Clone repository
- Create a virtualenv and activate it
- Install dependencies using
pip install -r requirements.txt
- Setup application using
python setup.py develop
export FLASK_APP=petshop
to set the applicationflask initdb
to create the initial databaseflask run
to start the app.
You can also, instead of running the app, run the tests using py.test
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.
-
Enable sorting by all columns. Right now, only the id sorting works and all the other columns also sort by id.
-
Description is not displayed in the pet details page. This should be inside a
<p>
tag withclass
description
. So something like this<p class="description"> Description here </p>
-
It's not possible to mark a pet as sold now. This needs to be fixed.
-
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.