0
I started to study a little bit about web development with Flask. The framework treats dynamic components of the URL as follows:
@app.route('/<comp_dinamico>')
def page(comp_dinamico):
# codigo
return '%s' % comp_dinamico
What I wanted to understand is how to substring in '/<comp_dinamico>'
becomes a variable. Or if this is not a variable, I would like to understand what it is. I thank you already.
You want to create your own framework is that it? Because if it’s not there’s no point in understanding how the nucleus works until it gets to this point, now if it’s got any sense.
– Guilherme Nascimento
"Doesn’t it make sense to understand how it works"? Wrong - one should not use things "why yes" - it is good to understand why it works yes - only it is not necessary to know how to do the same.
– jsbueno
I just wanted to understand how it works out of curiosity
– Augusto Dias