Giter VIP home page Giter VIP logo

travel-app-1's Introduction

TRAVEL APPLICATION

Table Of Contents


Travel Application Website Overview

Project Introduction

(Note: this is a fictitious client generated for the purpose of developing this project to test my HTML, CSS, Python, JavaScript and Django Framework essentials.)

This website has been designed to provide users with an easy to use web application to aide in the planning and tracking of travel. The primary objectives of this project are to develop a diary for users to log their travel/holiday experiences whilst also allowing them to mark visited and wish list countries on a map. In addition to these key deliverables the client would also like to provide users with basic country info and an easy to to use travel task manager.

Following discussions with the client this site will initially be tailored to Europe with the potential to expand the available countries following initial go live. There will also be future opertunities to provide a public blog for users to share their experiences with a wider audience however this is not in scope for the initial launch.

The client requesting this website is using this as the first step in creating a one stop location for planning and booking holiday and transport needs. The initial goal is to generate user traffic and link in with potential future partners such as Booking.com, Secret Escapes, Kuoni Travel, Skyscanner to provide a booking platform on a commision based model.


Responsive Review

Am I Responsive?

Login is required to view the site contents on responsive websites therefore the pages have been detailed via screenshots below.

Login

Home



Profile

Site Updates

Planner

Country Info

Task List

Diary


User Experience (UX)

Website Objectives

Client Goals

The client wants a simple and engaging website that is easy to use and will result in users returning to the site.

  • Sleek yet simple UX design.
  • Easy to use functionality.
  • Responsive for any device size to encourage mobile use as well as desktop use.
  • Links to the client's social network accounts to enhance their online presence.
  • Provide a base site to later introduce future partnerships relating to travel and accommodation bookings.

Visitor Goals

The visitor should have a clear understanding of what the website purpose is and the site functions should encourage regular use.

  • Immediately engaged by the UX design.
  • Understand the purpose of the site.
  • Simple intuitive menu navigation.
  • Intuitive content and links.
  • Ability to view site updates, enhancements and news.
  • Opportunity to feedback on site updates to drive future improvments to tailor site to user expectations.
  • Easy to access information about countries.
  • Access to a diary to record travel experiences.
  • Access to a task-manager/to-lists to manage travel activities.
  • Readable and aesthetically pleasing on all devices.

User Stories

All User Stories are detailed on my GitHub account as issues here.

These also breakdown:

  • Tasks required for each User Story completion.
  • Acceptance Criteria for each User Story.
  • Unit Testing for each User Story (where applicable)

Summary of User Stories

Account Management
  • As an Administrator I can login in and out of my superuser account so that I can manage the site.
  • As an Administrator I can add or delete user accounts so that I can manage the site.
  • As an Administrator I can update user account information so that I can assist users where required.
  • As a user I can register an account so that I can log in with my password.
  • As a user I can login in and out of my account so that I can use the site.
  • As a user I can reset my password so that I can still use the site if I have forgotten it or if it needs changing due to a security breach.
  • As a Site Owner I can host the site on a cloud platform so that it can be accessed by user be scaled up as appropriate.

Site Updates
  • As an Administrator I can post site updates so that users can be informed about latest features/updates.
  • As a user I can check site updates so that I understand site changes and improvements.
  • As a user I can comment on site updates so that I can influence future site enhancements.
  • As a user I can update my comments on site updates so that I can correct or improve posts if necessary.
  • As a user I can delete my comments on site updates so that I can remove comments that are no longer relevant.
  • As an administrator I can update comments so that I can detail actions taken to resolve issues raised.

Country Navigation
  • As a user I can select countries from a map or dropdown so that I can access information about them.
  • As a user I can mark a country to visited so that I can see at a glance where I have been.
  • As a user I can access basic country info so that I can decide if it is somewhere I might be interested in visiting.

Profile
  • As a user I can see my profile information so that I can confirm if it is correct.
  • As a user I can update my profile info so that it reflects any changes to my circumstances.

Travel Diary
  • As a user I can create a diary linked to a country I have visited so that I can record my experiences.
  • As a user I can update my diary posts so that I can fix mistakes or add info.
  • As a user I can delete diary posts so that I can remove unwanted information.
  • As a user I can view a list of all the tags added to my diary posts related to the country I am in so that I can search via the tags.

To-Do Lists
  • As a user I can view all the to-do lists I have for a country so that i can plan and track my travel and holiday activities.
  • As a user I can add new to-do lists so that I can create specific task managers.
  • As a user I can delete to-do lists so that I can remove lists that are no longer required.
  • As a user I can update my to-do lists so that I can fix mistakes or add info.

To-Do Tasks
  • As a user I can view all items in a to-do list so that I can see what specific activities are required.
  • As a user I can add new to-do items to a list so that I can manage new tasks I consider.
  • As a user I can toggle to-do items to open or closed so that I can see which tasks are outstanding.
  • As a user I can delete to-do items so that I can remove tasks that are no longer required.

Restrictions
  • As a user I am restricted from specific site updates, map and countries without first logging in so that I can do not try to submit a comment or visited with no user to assign to the object and generate an error.
  • As a user I am restricted from accessing updates and deletion comments created by other users so that no one can update the comment but the author.
  • As a user I am sent to an instructive page when I am unable to access a web page for any reason so that I understand why I am unable to access the page requested.

Website Design

Colour Scheme
Client requested the site to be built from shades of grey with a bold blue for emphasising key elements. This consideration was made to not pull focus or negatively impact the readability of the site due to its information nature.
  • Main colours:
    • #064467 (Dark Blue)
    • #cacaca (Light Grey)
    • #484848 (Dark Grey)
    • #e9e4e4 (Off White)
    • #ffffff (White)

In additon to the standard colour scheme delete buttons will be marked as red to indicate the risk assosiated with them:

  • Delete colour:
    • #e2110a (Red)

Colour Palette


Typography
For the typography the client wanted an easy-to-read text which is fun and engaging.
  • Title Font and Anchor Tags applied with backup options: 'Lora', serif;
  • Paragraph Font applied with backup options: 'Merriweather', serif;

Imagery
The images and icons used for development of this website were taken from the below sources.

Logo
Client provided the Logo they wish to see on the site.

Logo


Wireframes

Skeleton Plane

Skeleton Plane - Figma Link

Skeleton Screenshots

Login/Register/Reset Password:
Login/Register/Reset Password


Home:
Home


Map:
Home


Country Info:
Country Info


List:
List


Diary:
Diary


Tags:
Tags


Site Updates:
Site Updates


Update:
Update


Forms:
Forms


Surface Plane

Surface Plane - Figma Link

Surface Screenshots

Login/Register/Reset Password:
Login/Register/Reset Password


Home:
Home


Map:
Home


Country Info:
Country Info


List:
List


Diary:
Diary


Tags:
Tags


Site Updates:
Site Updates


Update:
Update


Forms:
Forms


Note: The structure and wireframes are only to act as a concept and are subject to change as the website development evolves in collaboration with the client.

Features

Features planning

Problem Statement

Following discussions with a focus group the following problem statement was developed alongside potential overarching features to satisfy user expectations.

Problem Statement
If you have a LucidChart account, you can also view this Mind-Map here.


Mind-Map

The below image provides an initial mind-map into the features which might be appropriate for the travel application based on the problem statement. This will aide in the development of User Stories.

Mind Map
If you have a LucidChart account, you can also view this Mind-Map here.


Priority Matrix

The below maps out the feasibility of the features considered against the user value they provide to help establish the priority they have as part of the build.

High Level Priority Matrix
Detailed Priority Matrix
If you have a LucidChart account, you can also view this priority matrix here.


Process Flow

The below details the process flow for travel application.

Process Flow
If you have a LucidChart account, you can also view this process flow here.


DataBase ER Diagram

The below demonstrates the site models and their attributes as well as documenting how they interact.

DataBase ER Diagram
If you have a LucidChart account, you can also view this functions flow here.


Agile Methodology

An Agile methodology was applied to the development and implementation of this project.

The project development was run in multiple iterations/sprints each targeting a number of User Stories.

Each User Story was moved out of a backlog and assigned to the iteration with a priority label (Must Have, Should Have, Could Have, Won't Have). In addition to User Stories, bugs and enhancments were also applied within certain iterations.

To manage the Agile iterations I used the projects function within my GitHub account, pulling User Stories into a KanBan Board. (Links to each project iteration detailed in the iteration breakdown below.)

Note: It should be noted that the priority label was in relation to it's prioriry within the iteration, not the project as a whole.

Iteration 1

For Iteration 1 the key focus was to target the Site Administration to ensure the platform was operational with a superuser. Test users were set up with the ability to login and out as well as reset passwords.

In additon to this some optional site update User Stories where applied to allow the site owner to detail updates to test users as the site was in development.

For site of the project in GitHub detailing the completed User Stories in Iteration 1 please click here.



Iteration 2

For Iteration 2 the key focus was to target the country navigation which would provide the platform to later add diary posts and a task manager.

In additon to this some more optional site update User Stories where applied to allow test users to comment on the updates posted by the site owner.

For site of the project in GitHub detailing the completed User Stories in Iteration 2 please click here.



Iteration 3

Due to other commitments I was unable to conduct a standard iteration.

Therefore, this iteration was used to review existing features and update them with user feedback. It was also used to finalise the site update features which will allow a tracker of future feature development and allow test users a way of feeding back their findings.

For site of the project in GitHub detailing the completed User Stories in Iteration 3 please click here.



Iteration 4

For Iteration 4 the key focus was to target the site Diary functionality which would allow users to post, update and delete diary entries related to a specific country.

In additon to this some optional profile User Stories where applied to auto generate a profile when a user is set up and allow users to update their profile info where required.

For site of the project in GitHub detailing the completed User Stories in Iteration 4 please click here.



Iteration 5

For Iteration 5 the key focus was to target the To-Do List functionality which would allow users create, update and delete lists as well as assigning tasks to the lists and toggling them from open to closed or deleteing them where required.

For site of the project in GitHub detailing the completed User Stories in Iteration 4 please click here.





Features breakdown

Each section below will detail their specific function.

Navbar/Footer Features

NavBar

The Navbar has been fixed to allow the user easy access to all key pages. (Some pages are not accessible via the nav bar as they are dependent on selections made via other pages e.g. country info).

Prior to login the user will see the following Navbar: Navbar Not Logged In

Note: Despite seeing the planner the user will not be able to access it until logged in. This was an intentional decision to show non registered users features they could not access to drive curiosity and engourage registration.

After login the user will see the following Navbar: Navbar Logged In

If the user is using a mobile screen they will have an expandable nav menu:
Navbar Mobile

Note: This menu will show the same options to the user, depending on their logged in status, as that of the large screen nav bar.

Footer

The Footer has been fixed to allow the user easy access to all social media links.
Navbar Mobile


Account Management Features

Register

New Users will have the option to Register an account. This page can be accessed either via the Navbar menu or by selecting the Sign Up option presented on the Login page when users first access the site (this link will be shown on the Login feature).

On valid Registration the user will be taken straight to the home page without having to re-login.

Register Page

Django validation checks will be carried out on the registration form as with all future forms referenced in this Readme file.

Register Form Validation 1
Register Form Validation 2


Login

If the user has a registered account they will be able to login to the site using the login page.

This page will also offer links to sign up and password reset. The password reset function will be covered below.

Login Page

If the user tries to access site areas where login is required they will be directed to the following login page.

Login Access Required Page

After completing the login they will automatically be redirected to the page they were initially trying to access.

Login Redirect

As with registration Djago will manage the standard form validation.

Login Access Required Page


Password Reset

The user will be given the opportunity to reset their password in case they forget it or want to change it for security purposes. The link to resetting the password is found on the login page.

On this page the user will be asked to enter their email to initiate the process. Standard Django form validation is used for confirming the email.

Password Reset

Once a valid email is input the user will get a confirmation that an email has been sent.

Password Email Sent

The user will then receive an email taking them to a password reset form.

Password Email Recieved

After following the email link the user will be asked to input a password and confirm it. This password will have a Django password validation applied to it to ensure it is secure enough to use.

Password Reset Form

Following a successful password reset the user will recieve the following confirmation page.

Password Reset Confirmation


Logout

The user can logout of the site by simply selecting the logout option on the Navbar menu.


Summary Site Updates

The client wanted users to be able to see a summary of the most recent site updates at a glance and didn't want this to be restricted to signed in users. The logic for this is that the site updates and site news articles could be a good way of incentivising new users to register.

To this end, the 3 most recent site update posts are always presented at the bottom of the Login, Register, Password Reset and Home pages.

Non logged in users can also select the 'see all updates' button to be taken to a page with all the site updates. However only signed in users will be able to navigate to any one specific site update in order to place comments.

Site_Updates Summary


Home Features

Parallax Home Screen

To create an engaging initial introduction to the site a Parallax effect was applied to the home page image. However to meet the asthetic requirements of the client this meant removing the inner scroll bar. As a result a downward facing arrow was applied to the screen to direct users to scroll down incase it was not immediately apparent. This arrow was given some simple JS flashing animation to make the page more interesting.

Home Parallax


Home Planner Introduction

Further down the home page there is a little introduction to some of the features the site offers as part of the planner.

Home Planner Introduction


Profile Features

Create Profile

On registration a skeleton profile will be automatically generated for each user.

Skeleton Profile


Profile Page

This page will allow users to view their site details as well as give them an opportunity to note down any travel objectives they may have.

In addition to this if the user has recorded any countries they wish to visit on the planner then links to these country info pages will be available to the user via their profile page.

Profile Page


Update Profile

Users will be able to update their details and travel objectives via the update Profile page.

They can also add an avatar or photo of themselves and update the Profile page background from a list of potential options.

Update Profile Page


Planner Features

Map Country Selection

From the map on the planner page the user can navigate to a country info page relating to that country. From here the user will be able to access a number of other application features which will be detailed below. One of these features will enable the user to mark the country to visited or wish list. Having done this the map will be updated to reflect the wish list and visited countries in different colours.

Country Selection Map

Note: The SVG used to show this map was taken from https://simplemaps.com/resources/svg-world and then tailored to the clients requirements. The client agreed that initial roll out should be tailored to Europe rather than the world.


Map Country Hover

Due to the size of the map it was not aesthetically pleasing to add names to each country via the svg file. However, the client wanted to ensure that users could locate the countries they were looking for and therefore JS was used to add a hover function to the map which would should the country name that the mouse is over. This country name can be seen in the top right corner.


Dropdown Country Selection

Due to the fact that many people using this site would be on mobile devices or tablets and would not have hover functionality available to them the client also requested that a dropdown be added in alphabetical order so that users can select the country that way if they wish.

In additon to this if a user has a country marked as 'wish list' or 'visited' additional dropdown fields will appear.


Pie Chart

To provide an easy to see visually appealing method of displaying how many countries the user has visited and wishes to visit npm Chart.js was used to present the information in a pie chart.

However, on a small screen test users indicated that this was distracting them from the key focus of the page(navigation) and therefore this is only visible on large screen sizes.

Pie Chart Hidden


Legend

A Bootstrap Modal was used and tailored to the requirement of displaying a legend for mobile devices so as not to take up space from the map.

Legend Small Screen


Country Info Header

To create a interesting and aesthetically pleasing country info page an image (taken from unsplash) and a flag (taken from https://www.iconfinder.com/flag-icons?price=free) was added to each country object.

This was then called dependant on the country pk that was used in the url.

A Back to Map icon was also added. Following user testing the concenses was that the image was intuative enough not to require text, this was also acceptable due to the fact that a user could also select Planner from the Navbar to return to the map.

Country Info Header


Country Info

To initially set up the countries with basic information a json was obtained from https://gist.github.com/keeguon/2310008?permalink_comment_id=4255990#gistcomment-4255990.

From here unwanted data/countries were removed and any required additional fields were added. This was then looped through to generate all the required country objects.

Country Info


Country Visited

Users can mark the countries they have visited or countries they wish to visit via the form on the Country Info page.

As stated in the map section above this will update the svg map to show the visited and wish list countries. In addition to this any wish list countries will also appear in the users profile page.

Country Visited


To-Do Lists

Users can use this feature to create, update or delete task lists. These lists are not the tasks themselves but rather a list of tasks that the user can add.

To-Do Lists
To-Do Lists Add
To-Do Lists Update

After discussions with the client and test users it was decided that the delete function would not require confirmation due to the simplicity of the lists. Therefore it deletes the list immediatly on selection.

To access the list itself to add and manage task items the user can select the list anchor. This will be detailed in the task manager feature section.


Diary Link

Users can access their personal diaries related to the country they are on via the diary link available.

Diary Link


Task Manager Features

Add Tasks

Users can create tasks within the selected list via the form available to them.

Add Tasks


Close Tasks

Once tasks have been completed users can mark them as closed. These will change colour and move them below the open tasks.

Close Tasks


Delete Tasks

If a user wishes they can delete a task entirely. As with the lists the test users and client opted for no confirmation for this deletion.

Delete Tasks


Re-open Tasks

Users will have the ability to re-open closed tasks if they wish. These tasks will return to their original styling and move back above the closed items.

Re-open Tasks


Diary Features

Add Diary Post

Once users have navigated to their specific country diary they will be able to add diary posts via the 'Add Diary Post' button.

Diary Page

Each post will allow the user to enter:

  • Content: Detailing their travel experiences
  • Image: This is an optional field the user can input if they wish. The image will be resized and stored to the client/site owner's AWS account.
  • Tags: The user can add multiple tags to a post if they wish which can later be used to help filter searches. If no Tag is added a 'NO TAGS' tag will be applied automatically. The user does not have to be case sensitive with the tag enteries as these are all converted to uppercase.
  • Experience: The user can select from a range of experience options. These will display on the post as emojis and can be selected to filter posts to that experience rating. This field is not manadatory and can be left 'Not Rated'.

Add Diary Post


Update Diary Post

If the user wishes to amend a post they have made they can select the update diary option.

Note: The diary post date will not be effected by this update. Due to the nature of a diary it is more critical to show the date of post over the amendment date.

Update Diary Post


Delete Diary Post

If the user wishes to delete a post they are not happy with they can select delete. Unlike the Task Manager this will required a delete confirmation as more detail is added to diary posts and therefore the impact of accidental deletion is higher.

Delete Diary Post


Pagination

Pagination is set to only show 2 posts per page. This was experimented with test users and they felt this was a good amount per page due to the large amount of content that cound be added to each post.

Diary Pagination


Filter

Users will be able to filter the posts they wish to see using a range of options.

They can type into the search bar and it will return any posts where the content or tags include what they have typed.

Diary Filter

The user can select the tags on the post itself to filter to the tag they have selected. Or they can navigate to the tag page via the 'Search Tags' button. This will list out all the tags that have been created and list them in order of their populatity. These can be selected and it will filter the posts to the tag selected.

Tags Page

The user can select the experience emoji on the post itself to filter to the experience they have selected.

Experience Filter

The user can refresh the page to remove all filtering via the refresh page button next to the search posts field.

Note: The pagination has been built to work on the filtered searches. Therefore, if there are more than 2 returned posts pagination will be applied.


Site Update Features

Site Updates Header

When the user navigates to the site updates page the header will return the total number of posts added.

Site Updates Page


Site Update Posts

The posts detailed on this screen are added by the site administrator. Users will not be able to add, update or delete any of these posts. However, logged in users will be able to select the post and add comments if they wish. This will be detailed later in this document.

The number of comments users have added to a post is shown at the bottom of the post next to a little comment icon.

Site Update Post


Site Updates Pagination

Pagination is set to only show 5 posts per page. This was experimented with test users and they felt this was a good amount per page.

Site Updates Pagination


Site Updates Filter

The site update posts can be filtered using 2 different methods.

The user can type a string into the search field and the page will return any posts where the title, content or topic contains that string.

Site Updates Seach Bar

The user can also open the filter tab built with JS to show all the topics with the number of posts assigned to each and select these to filter the posts.

Site Updates Filter Topic

Note: The pagination has been built to work on the filterd searches. Therefore, if there are more than 5 returned posts pagination will be applied.


Add Comment To Post

Once a logged in user selects a post they will be directed to a page where they can add comments and view other user comments related to that post.

On a large screen the add comment form is directly on the page. This allows users to enter a title, comment and optionally an image.

Site Update Large Screen

If the user is using a small screen they can access the add comment form via the 'Add Comment' button.

Site Update Small Screen

Site Update Form


Comment Linked To User

If a user views a comment that has been added by another user thay will not be able to update or delete it and the update and delete buttons will not appear on the comment for them.

Comment By Other User

However, if they are the comment owner the update and delete buttons are available.

Comment By User

!Note: Once a comment has been added the administrator has the ability to respond to it. This is so that if actions are required based on the comment the administrator can update the site users.


Update Comment

If a user wishes they can update their own comments. This will add an updated field to the comment to show when it was last amended.

Update Comment


Delete Comment

If a user wishes they can delete their own comments. This will take them to a confirmation page to check they do not delete comments in error.

Delete Comment


CRUD Notifications

Django Messaging

Whenever a user creates, edits or deletes an object in the database they will receive a notification informing them that their action has been successful.

This notification will only show for 3 seconds so as not to negatively impact the user experience.

Success Notification:

Notification


Error Pages

Error Information

Users will be provided with tailored pages when they experience errors.

Page not found:

404

Page not permitted:

403

Server Issue:

500


Admin

Admin Navbar

If an Superuser logs in to the site they will be shown an additional option on the navbar directing them to the Django administration area.

Admin Navbar Large Screen

Admin Navbar Small Screen


Admin Models

As part of the build for this project it has been useful to have access to all the models in the Admin section of the site. Following the clients approval most of these models will be removed leaving only the Site Update models and the Profile model.

These will be used by admin to add site update posts, add new or remove post categories and respond to user comments. The Profile will also allow the administrators to aide users regarding their site details once an appropriate Identification and Verifiication process is agreed.

Admin Models


Admin Posts

Admin will be given the task of posting about site updates and news. This will be completed directly from the administaton area.

Admin Posts

Summernote was installed to give the admin team more flexibility in how they posted the site updates and the specific fonts were added to the Summernote config. However, on review it was agreed that it would be more consistent to use standard inputs and formatthem using HTML and CSS via the templates.

As a result Summernote was removed from the admin.py files, settings and requirements.txt.


Admin Post Categories

Each site update post will be assigned a category to help users filter results. The admin team will have the ability to add and remove categories if required.

Admin Post Categories


Admin Comment Responses

When a user comments on an update it will assign the object a Comment Status of Review Required. This will allow the admin team to filter any comments made by the user and mark them to Reviewed once they have looked them over. These can then be filtered out on future reviews.

To this end a filter has been applied to the 'Comment Status'.

Admin Filter Comments

When an administrator reviews the comment they will have the ability to respond to it. This will them appear in the comment for all to see.

Admin Comment Response



Further Development

  • Add a Public attribute to Diary Post Model to create a Public Blog - still linked to countries.
  • Add rating system to site updates.
  • Build notifications with a link for user when there is an admin response to their Site Update comments.
  • Increase map from Europe to World.
  • Link booking sites.
  • Enhance AWS security protocols to allow site to have a wallet for passports and boarding cards.
  • Option advertisement space on site for travel companies.

Technologies Used

Languages Used

  • HTML
  • CSS
  • JavaScript
  • Python

Frameworks Used

  • Bootstrap:
    • For quick front end design.
  • Django:
    • Build site structure, routing, encryption, standard validation.

Libraries Used

  • boto3:
    • Used to integrate python3 site with AWS.
  • coverage:
    • Used to aid in python unit testing by generating an html to identify issues.
  • pillow:
    • Used to manipulate stored images.
  • django-crispy-forms:
    • Used to format forms.
  • django-resized:
    • Used to resize images stored in AWS account.
  • django-taggit:
    • Used to create a tag object linked to diary posts.
  • jQuery:
    • Javascript library for simplified JS useage.

Developer Tools

  • Google Fonts:
    • Used to obtain appropriate fonts to use in website not held as standard.
  • Font Awesome:
    • Used to obtain several icons used to improve the visuals of the website.
  • Git:
    • Used for version control and to Push to GitHub.
  • GitHub:
    • Used to store and share the code as well as publish to live website.
  • Figma:
    • Used to plan out website format.
  • Web Developer:
    • Used to analyse HTML, CSS and JavaScript output and correct where required.
  • tabletomarkdown.com:
    • Used to to quickly convert data to Markdown Tables tables for TESTING.md document.
  • Heroku:
    • Hosting deployed site.
  • SQLite3:
    • Hosting development and testing databases.
  • ElephantSQL:
    • Hosting PostgressSQL database for live site.
  • AWS:
    • Hosting images and static files.
  • Gmail:
    • Linked to site to send password resets.

Testing

Testing Document

Testing documentation found here.

Further Testing

  • Tested across Google Chrome, Safari, Microsoft Edge, Fire Fox browsers on both Mac and Windows.
  • Viewed on a variety of devices using Web Developer Tools as well as several live desktop, iPad and mobile devices.
  • Each page tested by developer and friends to ensure functionality worked as expected.
  • Issued to Slack community to review and provide feedback on.

Development Bugs

BT Email

On testing of the website it was identified that due to BT's strict spam policies users with a BT email address did not always receive their reset password emails.

If this site was to be push commercially BT have a contact for businesses to register with them and allow emails to be sent without restriction.

All other email proviers tested received reset password emails without issue.


Parallax Effect On Home Screen

On testing it was identified by multiple users accross a range of devices that the parallax image on the home page was not loading correctly.

Parallax Bug

On reviewing the Lighthouse score for this it became apparent that this was due to the image size and resolution. To resolve this issue the image was converted to a webp format.

Users confirmed this resolved the issue and Lighthouse gave good performance scores to confirm.

Parallax Bug

Note: There was one instance where the image still failed to load correctly. This was run on a mac using Parallels to validate a microsoft machine usage in Edge. However, on request 2 users ran the website on seperate microsoft machines using Edge and no issue occured.


Image Orientation

In development it was identified that certain images were rotating when they where uploaded to the AWS account.

Img Rotation Bug

To resolve this issue I updated the settings.py to manage the image orientation:

  DJANGORESIZED_DEFAULT_NORMALIZE_ROTATION = False

Img Rotation Fix


Line Break

In development when reviewing the site update posts it became apparent that line breaks were not being implemented into the posts.

Line Break Entry Bug


Line Break View Bug

To resolve this a |linebreaksbr was added to the required fields. This was implemented accross the entire site:

  <p class="text-center">{{ update.content|linebreaksbr }}</p>

Line Break View Fix



Tags Duplication

In testing it was identified that tags were case sensitive and that this was causing duplication of the same tags.

Tags On Posts Bug


Tags Page Bug


To resolve this issue I converted the tags to uppercase where the exclude duplication code could take effect for these instances:

  def form_valid(self, form):
     country = get_object_or_404(Country, pk=self.kwargs['pk'])
     form.instance.author = self.request.user
     form.instance.country = country

     tag_names = form.cleaned_data.get('tags')
     if tag_names:
        for i, tag_name in enumerate(tag_names):
              tag, created = Tag.objects.get_or_create(name=tag_name.upper())
              tag_names[i] = tag.name

     response = super().form_valid(form)

     tags = form.instance.tags.all()
     if not tags.exists():
        no_tags = Tag.objects.get_or_create(name='NO TAGS')[0]
        form.instance.tags.add(no_tags)

     return response

Tags On Posts Fix


Tags Page Fix


Pagination

In testing it was identified that when pagination was used on a filtered page it would reset the filter. This is because it was assigned its own value to the end of the URL which was being used to define the filter criteria.

To resolve i added a variable (search_query) into the view to get the value of the search criteria (q) and then passed this back to the template as context.

This variable could then be applied to the end of the pagination href to navigate back and forth but retain the search criteria:

  <a class="page-link" href="?page={{ diary_posts.next_page_number }}&q={{search_query}}" aria-label="Next Page">

Filter By Topic

In testing it was identified that when filtering by topic in the Site Updates the spacing in the topic names was causing HTML validation errors:

Filter By Topic Bug

To resolve this I applied |urlencode to remove URL spacing.

  <a href="{% url 'all-admin-updates' %}?q={{ topic.topic_catagory|urlencode }}" aria-label="filter to topic selected">{{ topic }}</a>

Admin CORS Console Errors

When using the Django Admin pages it was identified that CORS errors were being displayed on the console. This was due to the CORS policy I had set on my AWS account.

I updated the policy and this removed the errors.


Long Username

During final testing it was identified that is a user used a extremely long username it would negatively impact the formatting for the home page, comments and profile.

Long Username Bug

A long term solution to this issue would be to override the Django User model to restrict the username character allowance. However, at this stage in the delopment I did not want to impact the existing models. As a result I insead updated the CSS with word-wrap: break-word. This stopped long usernames exceeding their containers.

Home Update:

Long Username Home Fix

Profile Update:

Long Username Profile Fix

Comment Update:

Long Username Comment Fix


Key Learns

This project proved to be by far the most challenging and exciting project I have completed. Django did not come naturally to me and my understanding needed to be developed and enhanced by a number of really great online resources (see credits).

I had an almost endless list of things I learned from this project ranging from basic Django functionality to implementation strategies.

Below list some of the key factors I would try to improve upon for my next project.

  • As I developed my Django knowledge, I became more capable of writing smaller blocks of more efficient code. Given more time I would revisit earlier blocks of code to refine them further and improve their readability.
  • At times in this project, I showed an inconsistency of methods used to achieve the same tasks. Although these methods worked as expected, I would aim to be more consistent in future.
  • Throughout the project I gained a better understanding of class-based views vs function views. I frequently used class-based views where in some instances the development might have been better served and simplified using function-based views.
  • In some of my code, especially the earlier functions I tried to achieve too many things with a single function. In future I would use the html blocks to write more concise, tailored, and reusable code.
  • I need to be more efficient with the use of CSS. In future projects I will look to break the required components down into reusable elements for styling.

Deployment

Deployment Document

Deployment doumentation found here.


Credits

Development Resources

The following sources acted as guidance for understanding. No code was taken directly for use in this project:

  • Dennis Ivy – Youtube Instructor – Helped develop basic Django functionality knowledge.
  • Corey Schafer – Youtube Instructor – Helped develop basic Django functionality knowledge.
  • thenewboston – Youtube Instructor – Helped develop basic Django functionality knowledge.
  • B Learning Club – Youtube tutorial video – Helped develop understanding of Django taggit usability.
  • developedbyed - Youtube tutorial video – How to build Parallax image effect.
  • Code Institute Slack Community Support – Aided in the testing of the project and discussions regarding issues and features.
  • Code Institute Tutor Support – Code Institute for queries on issues I required clarification on.
  • Stack Overflow used for generalised queries during development.

Media and Content Resources

  • Images - See Website Design Imagery for links to the image/icon sites used within this project here.
  • Map SVG – The original SVG map was taken and tailored from the following source here.
  • Countries JSON – The JSON used to populate the Country Info was taken from here.

Acknowledgements

  • Thank to my Mentor (Spencer Barriball) for his feedback and guidance.
  • To all my friends and family that have taken the time to test this site and listen to me rant.
  • The Code Institute Slack community for helping with any and all queries.

travel-app-1's People

Contributors

joe-collins-1986 avatar

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.