Hello! I would like you to help me implement a filter form, I put them in cotexts:
Example:
I have a website about cars, I created my Car model with attributes such as:
- colour
- make
- model
- price
Now I want to find a way to make a filtering using a form, the case is that the form will have three input type drop-down, [make, model, price], when the user selects a make the model input must display only the models available for that make, how to achieve that?
Is it necessary to implement a Make and Model model and associate them with Car by a foreign key?
-- Example:
I have a website about cars, I created my Car model with attributes such as:
- colour
- make
- model
- price
Now I want to find a way to make a filtering using a form, the case is that the form will have three input type drop-down, [make, model, price], when the user selects a make the model input must display only the models available for that make, how to achieve that?
Is it necessary to implement a Make and Model model and associate them with Car by a foreign key?
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAP%3DoziTmabU-O0GmSZUr-BUWkYHzuFCLV1zyO4t-2b4NqCcZMw%40mail.gmail.com.
No comments:
Post a Comment