I'm brand new to Flask and cant seem to figure out why im receiving the 404 error page when rendering a template
PYTHON CODE
Here i'm trying to edit a request, when the edit button is clicked i want to be redirected to the "edit_request.html" page.
@app.route("/edit_request/<request_id>", methods=["GET", "POST"])
def edit_request(request_id):
request = mongo.db.user_details.find_one({"_id": ObjectId(request_id)})
return render_template("edit_request.html", request=request)
HTML CODE
Here is the link that, when clicked, should fire up the "edit_request" route but instead i receive "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again" message
<a href="{{ url_for('edit_request', request_id=request._id) }}">
<li class="req_menu_item">Edit Request<br>
<img src="{{ url_for('static', filename='images/makeedit_icon.png') }}" alt=""
class="chat_icon">
</li>
</a>
Also, here is a screenshot of my templates folder containing the "edit_request.html"
page.
And a screenshot of the full error:
SocketIO sock.bind
Any help would be greatly appreciated, if any additional information is needed i will be happy to provide. Thanks!