F
F
fantom_ask2020-09-15 16:23:31
Django
fantom_ask, 2020-09-15 16:23:31

How does django navigate through tabs?

I know that every single page in django can be created in the views.py
file, but what if I need to change only a small part of the template during the transition
AND only one variable with an if condition in the html template is enough.
Use

path('page/<int:page_id>/', views.page, name = 'page')

and I don't want to pollute the html database
. Or use the POST method to write to the where variable , return and check through
{% if args.where == 1 %}
, too, since everything is reset when the page is updated.
Is it possible to use something like \page?tab=1 to
{% if tab== 1 %}
quickly and easily switch between tabs on the same page ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-09-16
@bacon

1. you don’t understand what POST is for
2. you don’t read the docs, request.GET.tab

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question