Skip to content

Latest commit

 

History

History
104 lines (100 loc) · 6.03 KB

features.md

File metadata and controls

104 lines (100 loc) · 6.03 KB

Blog Content

Navigating Features

Features

Existing features

Front page and media query

Front page | Front page

Front page small screen |SignUp | Blogpost view small screen

Comment view small screen|Empty comment | Second page

  • The front page has two different views in desktop mode. One when the site user is not logged in and one when the user is logged in, this can been seen in the navigation bar at the top.
  • When the user is logged in they can access their particular functions.
  • -Admin can reach admin view thru the url window, on top of all functionality a regular user can access.
    • a regular site user can access the logout page, creating comments/editing/deleting comments and likin and unliking posts.
    • when a user logs in or out a message displays at the top of the page for three seconds to indicate the users action was successfull. This is du to a combination of backend functions in the apps code, Bootstrap messages and JavaScript, and some custome JavaScript code written at the bottom of the base.html page.
  • The responsiveness of all pages has been ensured on mulitple screen sizes.

Blogpost page

Shows slide Comment approval
Show comment security User view

  • Through the slug, which is created automatically while the admin writes the post heading, the indivual blogpoast can be reached. Every visistor can access this view and read the content.
  • But in order to interact the visitor has to register or log in.
  • When this is done more features are accessable to the site user. Liking and unliking a post, commenting on a post.
  • Backend wise the comment is rendered through a crispy form in forms.py and the model for the form is rendered from models.py.
  • After the comment is approved the user that left the comment have access to editing and deleting their comment.
  • the comment along with all other content created through the UI- and Admin-view, is saved and rendered from the postgres database.

About page

About

  • On the about page site users get to meet Tessa. It's simple page, with the basic navigation on top and social links in the footer.

Register page

Register | Register message

  • When registering for this site a user is presented with an allauth form page. That connects to a comment model in models.py, and the information is stored in postgres database.

Login page

Sign out | Sign out message

  • The login page is also from allauth. And the information is modeled from a comment model in models.py

Logout page

Sign out | Sign out message

  • The logout page is an allauth page. And the information is modeled from a comment model in models.py

Edit Comment page

Eidt comment

  • The front end of this page is basic, but backend ensures that only the user that leaves this indivual comment is the one who ca access this edit page through an if-statement with an equals equals attribute.
  • The authorized user, in this case admin, has a basic text field, where they can edit and then automatically be transferred back to commented blogpost, or go to home page, if they don't want to edit.

Delete Comment page

Delet comment

  • The delete comment page is only accessable if the user trying to access it also is the one who has left the comment. For more information see security features.

Admin page

Admin approve comments Admin edit/delete blogpost
Admin create/edit blogpost view Upload images

  • In the admin view a user with superuser status or staff status, has access.
  • Here django functionality ensures communication with databases, frameworks, tools and cloudbased services.
  • The look and functionality is created in models.py, rendering the view is handled in views.py.

Security

  • On external links there are _blank target tags which open a new page for the user, in order for neffarious actors to nog be able to hight jack that request each link as a noopener and norefferrer tag.
  • to ensure hackers don't get to potentially sensitive data a CSRF token is placed when an authentication feature is present.
  • To ensure only the person who has left a comment is the one who has access to edit or delete, the appearance of symbols for edit and delete only do soo if the requested user equals equals the account that laft the comment.
  • If a user of admin needs to delete their account all instances of that persons activity gets deleted through a cascade statement in models.py. Same goes for deleting blogposts.

Features left to implement

  • Open up possibility for more content creators, and with that being able to search for thier contributions via user_email, as well as title and/or content of post.
  • Rendering a blog post content into a downloadable PDF
  • Unittesting to decrease the amount of manual testing necessery.
  • More site user controlled features, like editing password, adding a image, gathering liked and commented post on a page of their own.