Answer the question
In order to leave comments, you need to log in
How to pass value between pages in django?
I want to make such a concept of the site, in which there will be no registration and only one secret word will be required for entry, which is entered into the form on the first page of the site. But then the problem arises: how to pass data from the form to all further pages? It is necessary that on each page of the site the username is displayed in the upper left corner. The main question is how to pass data between pages using the "a" tag?
Just in case, the login form code:
<form id='login_form' method='post'>
{% csrf_token %}
<p id='info_in_login'>Ниже введите секретное слово, для его получения напишите <a href="https://telegram.com" id='link_to_telegram' target='_blank'>сюда</a></p>
<div>
<input required type="text" name="secret_word" id='entering_secret_word'>
</div>
<div>
<button type="submit" id='submit_button'>Войти</button>
</div>
</form>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question