M
M
Mikhail Popov2015-10-14 11:24:43
Django
Mikhail Popov, 2015-10-14 11:24:43

How to select values ​​in the select field in the edit post form in the Django admin?

There is a Section model, it has fields
owner - this is the owner of the current record (ForeignKey from the Article model)
parent is the parent of the current record (ForeignKey from the same Section model)
When editing a record, I first select the owner,
after that I want the field parent, I was only able to choose from values ​​with selection by owner. How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zigen, 2015-10-14
@zigen

Google for "django related lists"
Here's an example that works well
Or more complicated:
here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question