M
M
Mooris2018-09-15 12:02:12
Django
Mooris, 2018-09-15 12:02:12

How to pass a parameter when authorizing in DJANGO?

Tell me how to pass a parameter from the authorization page of the DJANGO admin panel.
The essence is this on the admin authorization page there is a drop-down list with parameters

spoiler
5b9cc933c61c8170115984.png

During authorization, the user selects a specific parameter that is passed to the admin panel
spoiler
5b9cc9fa3da59775689576.png

How can this be done more correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Tikhonov, 2018-09-16
@tumbler

  1. Make an authorization form that accepts not only the username and password but also the selected parameter value
  2. When processing the form, write the selected value to the session
  3. Mock templates to render selected value in admin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question