Forums

Templates works locally but not when uploaded to respective folders.

In base.html located at /home/sdbh/mysite/templates I have:

<a class="dropdown-item" href="/stream/getprofile">Profile data</a>

The URL is giving me: https://sdbh.pythonanywhere.com/stream/getprofile The response is:

Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

The getprofile.html is located in /home/sdbh/mysite/templates/stream

Why won't it find the 'getprofile'?

Everything works locally. When uploaded to the exact same structure on here, then it fail.

Oh, and my app.py render to:

return render_template('/stream/getprofile.html')

.

Looks like a problem of relative paths.