D
D
d4p2021-12-18 21:41:10
Python
d4p, 2021-12-18 21:41:10

Why is the flask looking for styles in the wrong place and links not working correctly?

Hello.
I started learning Flask, but I couldn't find an answer to my question anywhere on the forums.

There is such a route:

@app.route('/order/<int:orid>/')

and for some reason all the links to which I go from this section work through the /order/ folder, and this is only in this section.

for some reason, styles are also searched for in the /order/static folder, despite the fact that there are no blueprints, etc., a little higher there is the same function with a route
@app.route('/user/<string:username>/')

and everything works as it should.

and why is a slash automatically added at the end of one march, and not added in the other?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-12-19
@Vindicar

What do links look like? Relative ones, like "some/other/page"?
If yes, then I have bad news - they work relative to the current address.
And if not, then give an example of links.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question