I'm a new on Django. One question confused me about the drop down list in Django. I'd like to know how to change the content in a page based on the selection in the drop down list in Django.
In Model.py I design the fields as:
STATUS_IN_CHOICE = (
('Pending','Pending'),
('Passed','Passed'),
('Failed','Failed'),
)
Status = models.CharField(max_length=10,choices=STATUS_IN_CHOICE,
default='Pending')
The respected result I want is, if I select "Passed" in the drop down list. All the passed cases show in the page. Others are the same.
I have no idea how to code the template and connect with the field now. Cause in my opinion, it's not a forms (post) at all.