Giter Club home page Giter Club logo

ev-forum's Introduction

EVforum.com

Live website here.

am I responsive

Introduction

Welcome to my Project No4. This is based on a Electric Vehicles Owners Club. It allows users to create, comment, like, edit and delete a post. It makes use of the full CRUD functionality.

The website contains four Categories:

  • EV News. Users can create posts about the latest news and topics on electric cars.
  • Ask The Community. User can find information about latest car meets, dealerships etc.
  • For Sale. Users can sell their cars or accessories.
  • Technical Area. Users can ask technical questions regarding evs.



Table of Contents

1. User Experience

  • Design Approach
  • User Expectations
    • New Users
    • Returning Users
    • Frequent Users
  • Color Design

2. Features

  • Landing Page:
    • Picture banner zoom effect
    • Navigation Bar
    • Category Cards:
      • EV News
      • Ask The Community
      • For Sale
      • Technical Area
    • Recent Post View
  • Category Section:
    • Adding a Post button
    • View all Posts from that category
  • Footer
  • CRUD Functionality
  • Authentication
  • Input Validation
  • Custom 404 Not Found Page

3. Wireframe

4. Testing

  • PEP8 Validator
  • Manual Testing

5. Technologies Used

6. Deployment

7. Bugs

  • Known Fixed Bugs
  • Existing Bugs

8. Credits



Top of the page

1. User Experience

Design Approach

The website is design with a simplistic approach in mind. Some of the features were inspired by the "I think therefore I blog" Code Institue module.

I have made full use of Bootstrap's and Django's "batteries included" features, where it has helped me to quickly design the website and focus on the backend development.

The idea was to keep the website simple and straight forward for users to use.

User Expectation

The main goal of the website is to allow users to interract with eachother by signing up, logging in and creating posts. They can also edit a post, comment on it and delete it if need be. All in a very simple manner. This allows them to find information on the latest news for electric cars and maintenance tips.


  • A new user:

    • A new use will understand the purpose of the website.
    • They will want create an account.
    • They will start to create and modify the content.
    • They will want to delete a post created by them.
    • They will leave a comment on any post.

  • A returning user:

    • Will edit any existing owned posts.
    • Leave a comment on any posts.
    • Delete any owned existing posts.

  • A frequent user:

    • Will check for any new content or features added to the site.

Top of the page

Color Design

The colour scheame was picked in the intention of keeping things simple and consistent. This has also allowed the website to be more accessible for visually impaired users.

The Message Alerts have been chosen green to emphasize that a comment or a post has been added successfully.
alert message



Top of the page

2. Features

Landing Page

Main Image Banner

The Main image on the landing page zooms in when first loaded. main banner image

Navigation Bar

Small to Medium Screens small to medium screen navbar

Large Screen large screen navbar

Category Cards

category card sections

The 'Go to section' button will take the user to their chosen section.

Recent Posts

recent posts landing page The 'Recent Posts' section on the landing page shows the last 6 recent posts made by all users. On the right hand side there's a 'Created' section shows the date and time when the post was created.

Top of the page

Footer

footer section All the social media icons open in a new tab when clicked on. They also have a green hover effect.


Top of the page

CRUD Functionality

A user can:

Create a post. create a post page

Details entered, post created. post detail

Edit a post. The existing information gets loaded and allows the user to change the text. post edit

Alert once the post has been amended successfully. post edit message alert

Delete a post Modal as long as the user is the author of the post. post delete modal

Alert once the post has been deleted succesfully. post delete message alert

Comment on a post.
comment textarea

Comment alert. comment alert message

Comment added on the feed.
comment feed

Top of the page

Authentication

A user can Sign Up, Login and Logout from the website. This has been achieved using Django's batteries included features and a library called allauth.

Sign Up form. sign up page

Login form. login form

Once registered or signed up, the user will be redirected to the homepage.

404 Not Found

not found

Top of the page

3. Wireframe

The wireframe was created using Balsamiq. As you can see, as the project evolved, the design has also changed, however the wireframe was crucial in identifying which design approach the website will take.

mobile wireframe mobile wireframe mobile wireframe mobile wireframe

web wireframe web wireframe web wireframe web wireframe web wireframe web wireframe web wireframe

Database Wireframe

database wireframe category model post model comment model contact model

Project cards have been used to keep track of progress and add new ideas and features.
project cards

Top of the page

4. Testing

PEP8 Validator

admin.py admin.py file

apps.py apps.py file

forms.py forms.py file

models.py models.py file

urls.py urls.py file

views.py views.py file

setting.py
I have decided to ignore these warnings as trying to split the code would result in potential errors. The code is easy to read and understand in its current format. settings.py file

urls.py evforum configuration urls.py file

CSS Validator

style.css file

HTML Validator

html validator

Top of the page

Manual Testing

I have been using AmIResponsive to check the responsivness of the website.

I have used Lighthouse for performance and accessibility check. lighthouse check

landing page register page sign in page contact us page category page add post page post details page edit post page



Top of the page

5. Technologies used

HTML5

  • For the Hyper Text Markup Language

CSS3

  • For the Cascade Style Sheets

Python

  • For the backend app development

Javascript

  • For the message allert timeout inspired by CI

Boostrap 5

  • For the styling of the website

Django 3.8

  • The base platform used to develop and bring all the dependencies together

PostgreSQL

  • For the Database

Heroku

  • For the app deployment

Gitpod

  • The code development platform

Github

  • To create and store my repository

Balsamiq

  • For the initial design of my wireframe

FontAwesome

  • For the icons present in templates

Google Fonts

  • For the fonts

Google Chrome

  • For the Devtools

Online Code Validators:

- W3C
- PEP8
- JShint



Top of the page

6. Deployment

First Deployment

Gitpod:

  • Create a new repository using the Code Institute template
  • Follow the guide provided by CI to install Django and it's dependencies
  • Create the new project 'evforum.com'
  • Link to Heroku via the Procfile
  • Create requirements file

Heroku

  • Log into Heroku and create a new app 'p4-ev-forum'
  • in the 'Resources' tab search for PostgreSQL and sellect the 'hobby' option.
  • In the 'Settings' tab enable Config Vars
  • Link the following:
    • CLOUDINARY_URL
    • DATABASE_URL
    • SECRET_KEY
    • DISABLE_COLLECTSTATIC set to 1

Github

  • Create env.py file and link the database from Heroku
  • Add:
    • CLOUDINARY_URL
    • DATABASE_URL
    • SECRET_KEY
  • Commit and push to Github

Heroku

  • Under 'Deploy' tab connect the Github repo by searching it in the search bar.
  • Select 'Manual Deployment' and make sure the logs throw no errors.
  • Once compelted, select View.
  • This is the result initial deployment

Production Deployment

Github & Gitpod

  • Set DEBUG=False in the settings.py file
  • Update the requirements.txt file
  • Push to Github

Heroku

  • In the 'settings' tab reveal the config vars
  • Remove DISABLE_COLLECTSTATIC
  • Under the 'deploy' tab, select 'Deploy Manually'
  • Once finished, select View
  • This is the Result production deployment

Top of the page

7. Bugs

Known Fixed Bugs

Throughout the development process a few bugs have been encountered, however a few were paticularly challenging to solve:

Problem:
Initially I could not perfom the initial deployment successfully. This is because I have tried to use Django 4.0 and some additional steps were needed to ensure the deployment was successfull

Solution:
I have downgraded to Django 3.8 for the purpose of this project.

Problem:
When trying editing an existing post, the Image field was displaying a link to cloudinary to whichever picture was previously uploaded. Occassionally this would have thrown a not found error but not all the time.

Solution:
I have chosen to remove the Image field if a post was edited so the image link is not displayed. Another solution would have been to use Javascript to try and disable the link, giving the user the option to change the picture if they wanted to.

Problem:
When adding a new post, the page was getting redirected to the home page. I wanted to redirect it to the post itself however the redirection to the post.id was set wrongly causing an error to appear.

Solution:
The solution was to setup the redirection correctly.
redirection



Existing Bugs

W3 HTML validator shows some errors which are not present in my code. This only shows when the jinja content is loaded. All of the html tags are opened and closed correctly. w3c warnings



Top of the page

8. Credits

  • Stack Overflow for help with code troubleshooting and suggestions on best practices.

  • Code Institute for:

    • Gitpod initial template
    • The ideas from 'I think therefore I blog' module
    • Tutors of CI for helping me with some bugs
  • My mentor Marcel Mulders for the constructive feedback and always pushing to go the extra step.

ev-forum's People

Contributors

mrbertieg 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.