DeeMcCart / CI_PP5_Jeweller

Jewellery website for CI Project 5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

User Story: FTU_02, SO_01 Ease of navigation, graceful error pages

DeeMcCart opened this issue · comments

EPIC: #35

  • SO_01 As System Owner I want to provide robust error handling so the user cannot 'break' the site and always gets graceful error handling
  • SO_01 As System Owner I want to provide a system that is easy to use to encourage users to visit and return to the site
  • FTU_02 As a First-Time User I want to easily navigate the site so I don't become frustrated and leave

Assumptions or Pre-Requisites:

  • Base site is constructed
  • Most apps sending messages
  • General tidy-ups for consistency across apps

Acceptance Criteria: (Must be completed before task is moved to 'Done')

  • Must fail with pre-loaded error pages 403 404 500 etc which offer the user a route back into the site

Tasks

  • Task1 Error pages - setup templates for 400 403 404 500 error pages
  • Task2 jeweller/urls.py: # Error handlers for site errors
    handler404 = 'home.views.error_404'
    handler500 = 'home.views.error_500'
    handler403 = 'home.views.error_403'
    handler400 = 'home.views.error_400'
  • Task3 home/views.py to invoke these pages as needed when http errors occur:
    def error_400(request, exception):
    data = {}
    return render(request,'400.html', data)
    def error_403(request, exception):
    data = {}
    return render(request,'403.html', data)
    def error_404(request, exception):
    data = {}
    return render(request,'404.html', data)
    def error_500(request, *args, **argv):
    return render(request,'500.html', status=500)
  • Task4 Test
  • Task5 Allauth screen cleanup - make signup/register; login; logout; password reminder consistent with BA walkthrough styling
  • Task6 Add grid template for product maintenance to reduce administrator keying needed for product maintenance

DMcC 09/02/24: Settings applied. Note can't test in DEV as settings DEBUG=False throws errors on retrieving static files.
Not entirely sure my approach of putting the logic into the home/view.py and the urls into jeweller/urls.py is correct. Review once I can test in PROD environment.

DMcC 12/02/24 Have built error pages during Sprint3, but testing not yet successful. Moved to backlog for Sprint4 completion

19/02/24 Sprint Review - Have done the error pages and improved the navigation bit by bit - possibly more could be done but closing out this issue for now andpickup on other items during validation etsting.