N
N
nano_e_t_42015-11-13 09:50:22
Flask
nano_e_t_4, 2015-11-13 09:50:22

How to pass tokens to flask?

Hello everyone
Guys, tell me, who knows if it is possible to transfer a token from a web template that points to the current rendered template?
That is, you need to describe 2 functionals - adding values ​​​​to the database and changing the values ​​​​in the database.
There are 2 identical templates for each action, but with different links (respectively, a different render ... within the framework of the project, this is convenient). But I don’t want to write an additional handler (and, in principle, I want to show off a little :) ) and just write a condition into the add function - if the token is the add template, do the addition, if the token is the change template - do the update

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Komly, 2015-11-13
@Komly

Usually, a hidden input is used for this,
and by its presence it is determined what is happening, editing or creating a new record.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question