Skip to content

Latest commit

 

History

History
292 lines (218 loc) · 13.7 KB

README.md

File metadata and controls

292 lines (218 loc) · 13.7 KB

Animal Hostel

Animal Hostel is a website that enables people to offer a home to a homeless animal. The home page shows photos of the animals currently at the hostel as well as a short description of what the website is about. Users can browse the current occupancy but to make an offer they need to register and log in. Once logged in they can view, edit or delete their offers as well as see the status of the offers. They can also specify whether their interest is in fostering or adopting. The goal of the site is to find owners for these poor unfortunate homeless animals. The administrator can add and maintain the animals and approve or reject the offers.

Am I responsive

Site Owner’s Goals

  • The site looks good visually.
  • The site is responsive.
  • The site is accessible.
  • The site is easily navigable.
  • The site displays the animals at the hostel.
  • The site provides the means for users to offer homes for the animals.

Site Administrator’s Goals

  • To be able to add and maintain a list of animals.
  • To be able to approve or reject offers made.
  • To be able to maintain the animal types.

Users Goals

  • To find the site interesting and useful.
  • To find the site easy to use.
  • To be able to view the animals looking for homes.
  • To be able to offer a home to a particular animal.
  • To be able to specify my interest in fostering vs adoption.
  • To be able to see the status of my offers.

User Stories

As a site owner

  • I want the home page to display a rotating image of each animal so users will find the site interesting.
  • I want the home page to explain its purpose so users will immediately get it.

As a site user

  • I can view a list of animals so that I can select one to take home.
  • I can filter the list of animals so that I can see only the relevant ones.
  • I can click on a guest so that I can read the full details about them.
  • I can register an account so that I can make offers on animals.
  • I can make an offer to a guest so that I can give them a home.
  • I can see my offers so that I can see the status of each one.
  • I can edit my offers so that I can change the details.
  • I can delete my offers so that I can rescind my offer.

As a site administrator

  • I can add, view, update and delete animals so that I can maintain the list.
  • I can add, view, update and delete animal types so that I can maintain them.
  • I can approve or reject offers so that I can find the right home for each guest.

Wireframes

The wireframes below were generated using Balsamic.

Django Administration Screens

 

Entity Relationship Diagram

This diagram was created using SmartDraw.

Models

 

Models

Animal Type

Code models.CharField(max_length=20, unique=True
Description models.CharField(max_length=100)

Animal

Name models.CharField(max_length=200, unique=True)
Slug models.SlugField(max_length=200, unique=True)
Type models.ForeignKey(AnimalType, on_delete=models.CASCADE)
description models.TextField()
image CloudinaryField('image', default='placeholder')
slogan models.TextField(blank=True)

Offer

slug models.CharField(max_length=200, unique=True)
animal models.ForeignKey(Animal, on_delete=models.CASCADE)
user models.ForeignKey(User, on_delete=models.CASCADE
basis basis = models.CharField(max_length=1, choices=('Adoption','Fostering')
pitch models.TextField()
weeks models.PositiveSmallIntegerField(null=True, blank=True)
status status = models.CharField(max_length=1,choices=('Aproved','Pending','Rejected')

Design Choices

Fonts

I wanted my site to have a simple clean look where the photos of the animals could dominate. Therefore I decided to use a basic san-serif font for the text and just use the Lato for the brand name.

Icons

I decided to use icons from Font Awesome where necessary to indicate easily recognizable functions like delete and
for social media.

Colours

I decided to keep the website mostly white with light grey backgrounds so the photos could focus the eye but I also wanted one stand-out colour that popped
and brought the website together so I choose a peppy orange colour for this. I am using the standard bootstrap dark grey colour for most of the text which is white on coloured backgrounds to stand out. Buttons and links use the orange colour.
Below is the pallet which I generated using Colormind.

Colours

Features

The site consists of a home page featuring a Carousel of photos and a list of honoured guests. There is a login and register page so users can sign-up and login and a logout page. The animal administration is available via the django administration screens where animals can be maintained. Once signed in the My Offers page becomes available from where users can view, add, edit and delete their own offers.

Existing Features

Navigation Bar

  • Featured at the top of the page, the fully responsive navigation bar includes links to the available pages.
  • If signed in the available links are Home, Guests, My Offers and Logout.
  • If signed in the available links are Home, Guests, Register and Login.
  • Also, if signed in the user name appears on the right of the navigation bar.
  • If not signed in the site mission appears on the right instead.
  • On small screens the navigation bar appears as a hamburger icon which expands when clicked.

Navigation Bar - Phone

Navigation Bar - Desktop

Navigation Bar - Desktop

Carousel

  • Featured on the home page just under the navigation
  • It loops through the images loaded for each guest displaying them
  • The indicators show the position of the current photo in the list
  • The controls can be used to move forward or back through the list.
  • Where no photo is loaded a placeholder photo is shown instead.

Carousel

Site Description

  • Some text describing what the site is about.

Welcome

Guest List

  • Card representation of each animal featuring a photo, Name, Type, and slogan

Guest List

Link to offers

  • Link to offers if signed in and to register if not.

Offers link
Offers link
Offers link

Guest Details page

  • Displays heading with animal name, slogan and photo
  • Displays a larger description also.

Guest Details
Guest Details

My Offers page

  • Displays offers for that user only. Name is a link to edit offer. Appears orange on hovering.

Offers

Make an Offer

This page allows the user to make/add an offer for an animal or guest.

  • The current guests are listed in the dropdown for animal.
  • The pitch area allows users an opportunity to convince the administrator that they over the best home of this animal.
  • The basis field offers a choice of Adoption or Fostering.
  • The weeks field is optional but should be entered for fostering to indicate how long the user would be prepared to foster for.
  • The submit button adds the offer to the database.

Add Offer Add Offer

Edit Offer page

  • Displays details for the offer and allows them to be changed. Save button saves changes to database.

Edit Offers Edit Offers

Delete Offer page

  • Displays details for the offer and allows them to be deleted. Delete button deletes from the database.

Delete Offers Delete Offers

Footer

  • Displays copyright details, the address and phone number and the social media icons.

Footer Footer

Django Admin functionality

  • Animal types, animals and offers can be administered from the django admin screen.
  • Offers can be given a status here.

Types Animals
Offers

Features Left to Implement

  • A means of allowing users to donate to the hostel.
  • USER STORY: Filter on category #4
  • It would be preferable to have a separate page implemented for the administrator functions where they can maintain the types and animals and set the status of offers without having to use the django administration screens.
  • It would be nice to be able to filter on other sub categories also like small dogs or older cats.
  • It would also be nice to sign up for an email alert if certain animals of interest to a user get added.

Technologies used

Languages

  • HTML
  • CSS
  • Python

Libraries & Framework

  • Django

Tools

Testing

  • The complete testing details are contained here.
  • During testing I discovered that my development db.sqlite3 database had been accidentally pushed to github.
    I immediately added it into .gitignore to prevent this re-occurring, removed it from github using the git rm -r --cached *.sqlite3 command,
    committed and pushed this to github/heroku and recycled the API Keys.
  • The results of running my automatic tests are here
  • The branches created for this implementation have not been deleted as they normally would to demonstrate their use in the project.

Validator Testing

Unfixed Bugs

  • If you register and specify an email you will receive two flash messages only one of which disappears.

Deployment

  • The complete deployment details are contained here.

Credits

Content

  • The content is all made up.

Media

Roger
Katie
Bruce
Sam
Group