Giter VIP home page Giter VIP logo

wild-atlantic-way-blog's Introduction

Purpose of this site

Wild Atlantic Way travel blog is a public online blog-style platform where users can find information about places to visit. Unregistered users can view the list of posts and select a post to view the full post and comments. Registered users can create, update and delete their own post. They can also leave comments and like posts.

Screenshot of Wild Atlantic Way Travel Blog

Desktop Mobile
Desktop Mobile

-By Eric Blake

Table of contents

UX

Strategy

  • Build a simple, fun travel blog that will engage the user.

Target Audience

  • Anyone with an interest in travelling.

User Goals

First Time User would like to

  • Find out the purpose of the site and how to use it
  • Be able to easily navigate throughout the site
  • See a list of posts to see if the site is something they would be interested in
  • See the top posts
  • Filter post by category
  • Be able to register for a user account

Registered User would like to

  • Sign into their user account
  • View posts and leave comments and likes
  • Create their own post
  • Edit and delete their own posts only
  • Logout of their account to keep their account secure

Site Owner would like to

  • Restrict access to non-registered users
  • Control users posts and comments for inappropriate use of the site. All posts and comments must be approved by Admin before they are live on the site

Agile Development Tool

I utilized a GitHub project and a Kanban board. Kanban board As I start working on each issue I move it to the 'In progress' column. When the coding for each issue has been completed, the issue is then moved to the 'done' column.

User Stories

I used Github Issues to record the following user stories:

All User Stories include:

  • Acceptance Criteria
  • Tasks
  • Labels (MoSCoW Priotarization)

Must-Have

Should-Have

Could-Have

  • N/A

Wont-Have

UX design

Wireframe

I have used Mockflow to create the following wireframes for both desktop and mobile devices.

Page Wireframe Desktop Wireframe Mobile
Home page - user signed-out Home page image Home page image
Home page - user signed-in Home page image Home page image
Post Detail page Post detail page image Post detail page image
About page About page image Home page image

Structure & Logical Flow

The database model diagram was designed using Microsoft Visio

Screenshot of flowchart

Post Model

  • The main model that contains all the fields needed for the blog posts.
  • This model is based on the "I think therefore I blog" walkthrough project. Some adjustments and additions were made to fit the needs of my project.

Comment Model

  • Enable logged in users to add comments to different posts.
  • This model is based on the "I think therefore I blog" walkthrough project.

Category Model

  • This is a custom model that enable users to see a list of categories.
  • Users can filter posts by category.

Colour Scheme

  • The background colours is form of grey - rgba(240, 238, 238).
  • The buttons use the standard bootstrap secondary button color.

Fonts

  • The fonts used through out are Lato and Karla. These are sans-serif fonts that are part of the Google font collection. They are professional and very readable fonts.

Features

Existing Features

Admin Page

  • An admin area only allowing access to the site admin/superuser.
  • The admin page is only accessible by typing "admin" in the url https://wild-atlantic-way-c6d960b228a8.herokuapp.com/admin/.
  • User name and password must be entered to access the admin page.
  • The administrator must approve all posts and comments before they are live on the site.
  • The administartor can update/delete posts and commments.

Admin page

Navbar

  • The navbar is basic so that it is very easy for the user to read. The name of the website is the top left hand corner. There are links to Home, About, Register and Login pages for all users. If the user is not signed in, the sign in and register links are visible on the navbar.

Navbar for user not signed in

  • If the user is signed in, then there is a Logout link visible and a Create Post link.

Navbar for user not signed in

  • In mobile view the navbar is collapsed into a hamburger icon, which when clicked shows the same information as in desktop view.

Mobile Navbar

Mobile Navbar for not signed in user

Mobile Navbar for signed in user

Footer

  • The footer is simple layout with displaying social media options. When an icon is clicked, it opens in a new tab so that the user still has the main site open.

Footer

Sidebar

  • The sidebar contains the categories filter and the popular post list. The sidebar is hidden on screens less than 992px.

  • Clicking on a category will filter the post list by the selected category.

Categories

  • Clicking on a post in the popular post list will open the post detail page.

Popular posts

About

  • The about page is a simple page with text outlining the purpose of the site and the contact details.
  • There is a link to the register and login pages for users not signed in.

About

Register

  • The form enables users to register for an account.

Register

Sign-in

  • The form enables users to sign-in to their account.

Sign-in

Sign-out

  • The form enables users to sign-out of their account.

Sign-out

Create Post

The form enables a signed in user to create a new post.

Sign-out

Update and Delele post

  • A signed in user has access to the edit and delete buttons for their own posts.

 Update and delele post

  • A user that in not singed in will not have access to the edit and delete buttons.

 Update and delele post

Update Post

  • When a user clicks on edit on the post list page they wull be redirected to the post form. The form will display the post details and the user can update details as required.
  • After making the required updates, the user will need to click on the update button to make the changes pernament.

Update post

Confirm Delete Post

  • When the user clicks on the delete button they will be taken to the confirm delete post page. The user can click on delete to pernamently delete the post, or click on back to return to the post list page.

Sign-out

Comment form

  • A signed in user can leave comments on all posts.

Leave comment

  • After submitting a comment the user will receive a message informing them that their comment is awaiting approval. Site admin must approve comment before it is visible on the site.

Comment approval

  • All users can see a list of previously approved comments.
  • All users can see the comment count for each post.

Comment list

Like post

  • Signed in users can like a post, or unlike a post they have liked.

  • All users can see how many times a post has been liked.

  • An unliked post will be a regular heart icon.

Comment count

  • A liked post will be a solid heaart icon.

Comment count

Future Features

  • Number of page views per post.
  • Social media login.
  • Search Filters.

Technologies Used

Coding languages used

  • HTML
  • CSS
  • Python
  • JavaScript

Frameworks and Libraries used

Django

  • Framework used to build this project. Provides a built in admin panel and includes many helper template tags that make writing code quick and efficient.

Django-Allauth

  • Used for User authenticaion (register, login and logout).

Django Crispy Forms

  • Used to control rendering of Django forms.

ElepantSQL

  • The database used by the deployed project on Heroku.

psycopg2

  • PostgreSQL database adapter for the Python programming language.

Gunicorn

  • Python HTTP server for WSGI applications.

Summernote

  • WYSIWYG editor. Used for comment form.

Cloudinary

  • The cloud platform used to store static media files.

Mockflow

  • Used for the wireframes

Git

  • Used for version control.

CodeAnywhere

  • Used as the IDE to code this website.

Heroku

  • The cloud platform used to deploy the project in the live environment.

Bootstrap

  • The front end development framework used for styling along with custom CSS.

Microsoft Visio

  • Used for the entity relationship diagram

Testing

Detailed testing of the site can be found at TESTING.md

Testing includes the following:

  • Validator testing
  • Responsivness & Browser Compability Testing
  • Manual testing
  • Browser testing
  • Device testing
  • Bugs

Deployment and local development

Deployment

The following steps were taken to deploy this website to Heroku

  1. Elephant SQL database:

    • Open ElephantSQL and sign-up for a free account
    • Click on 'Create New Instance'
    • Enter a database name for the project and select Tiny Turtle (Free plan), click on continue
    • Select your region, click on 'Review' and 'Create instance'
    • Click on your instance in the list to open it
    • Copy database URL in the URL field
  2. Heroku App:

    • Select 'Create new app' in Heroku
    • Enter an App name and select the location
    • Select 'Settings' in the menubar. Click 'Reveal Config Vars' and add the following:
      • DATABASE_URL: the DATABASE_URL copied from ElephantSQL
      • SECRET_KEY: The SECRET_KEY string you created
      • PORT: 8000
    • Click 'Deploy' and then 'GitHub' under 'Deployment method'
    • Select the repository you want to deploy and click 'Connect'
    • Scroll down and click 'Deploy Branch' to complete the process
  3. Prepare the environment and settings.py file:

    • In the settings.py file within the django app, import Path from pathlib, import os and import dj_database_url
    • Insert the line if os.path.isfile("env.py"): import env
    • Remove the insecure secret key that django has in the settings file by default and replace it with SECRET_KEY = os.environ.get('SECRET_KEY')
    • Replace the databases section with DATABASES = { 'default': dj_database_url.parse(os.environ.get("DATABASE_URL"))} ensure the correct indentation for python is used.
    • Save all files and make migrations - python3 manage.py migrate
  4. Cloudinary:

    • Create a Cloudinary account
    • Add Cloudinary URL to env.py
    • Add DISABLE_COLLECTSTATIC to Heroku Config Vars
    • Add Cloudinary Libraries to installed apps
    • Tell Django to use Cloudinary to store media and static files
    • Link file to the templates directory in Heroku. Place under the BASE_DIR line
    • Change the templates directory to TEMPLATES_DIR. Place within the TEMPLATES array
    • Add Heroku Hostname to ALLOWED_HOSTS
    • Create 3 new folders on top level directory - media, static, templates
    • Create a Procfile on the top level directory, add code 'web: gunicorn PROJ_NAME.wsgi'
    • Save all files and add, commit and push changes to Github.
  5. Deploy

    • In Heroku, navigate to the deployment tab and deploy the branch manually - watch the build logs for any errors.
    • Heroku will now build the app. Once it has completed the build process you will see a 'Your App Was Successfully Deployed' message and a link to the app to visit the live site.

Cloning the repository

The repository was cloned to my local PC. The steps to clone are as follows.

  • In the Github repository, navigate to the main page of the repository.
  • Click on the green Code button and copy the URL.
  • Select Clone by HTTPS option.
  • Open the code editor and within the terminal change the directory to the location you want to clone the repository to.
  • Type git clone and paste the URL copied earlier.
  • Press enter to create the local clone.

Forking the Repository

By forking the GitHub Repository, we make a copy of the original repository on our GitHub account to view and/or make changes without affecting the original repository by using the following steps...

  1. Log into GitHub or create an account.
  2. Locate the GitHub Repository.
  3. At the top of the repository, on the right side of the page, select "Fork"
  4. You should now have a copy of the original repository in your GitHub account.

Cloning the repository

The repository was cloned to my local PC. The steps to clone are as follows.

  • In the Github repository, navigate to the main page of the repository.
  • Click on the green Code button and copy the URL.
  • Select Clone by HTTPS option.
  • Open the code editor and within the terminal change the directory to the location you want to clone the repository to.
  • Type git clone and paste the URL copied earlier.
  • Press enter to create the local clone.

Forking the repository

By forking the repository, you can make a copy of the repository and make changes without affecting the original repository. the steps to fork are as follows:

  • Locate the repository in Github.
  • On the top right corner of the page click Fork.
  • A copy of the repository will now be created in your own repository.

Credits

Acknowledgements

  • Mitko Bachvarov. My mentor who provided me with advice and feedback throughout this project.

wild-atlantic-way-blog's People

Contributors

eric-blake 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.