GrLdev / GrLdev/Rate-My-Student-Home

Display ValidationErrors in html

Open
#39 0 comments 0 reactions 0 assignees View on GitHub
backend enhancement frontend
Dominant language
Python
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Errors are raised in _forms.py_ and _maps.py_
![image](https://github.com/GrLdev/Rate-My-Student-Home/assets/72320294/48c475dd-4d83-4eb4-b699-c5f26a8fb9b3)
![image](https://github.com/GrLdev/Rate-My-Student-Home/assets/72320294/24cad822-cc1c-407b-92a9-8240c2db54c2)

1. In routes.py make the necessary import: from flask import flash

2. In routes.py these errors need to be caught and displayed in a flash message or some other format to display to the user, here is an example from a previous project:
![image](https://github.com/GrLdev/Rate-My-Student-Home/assets/72320294/ac87cef4-4fae-4cd8-98a4-9f7830b7879d)

3. In layout.html or create.html display the flash messages, here is an example from a previous project:
![image](https://github.com/GrLdev/Rate-My-Student-Home/assets/72320294/9479924d-a430-461e-99bc-2f4ce376e4d9)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.