How can I filter my table to only show the quotes from a project.
In order to display all quotes, I am using {% for quote in quotes.all %}
Now, I would like to display quote relative to a site. Which means when selecting my site_id, I`ll be able to only see the quote relative to this site_id. I could write something like
{% for quote in quotes.all %}
{% if quote chantier.id %}
{% endif %}
{% endfor %}
but this is wrong.
Here is my model for quote:
models.py
class Quote(models.Model):
name = models.CharField(max_length=30)
site = models.ForeignKey(Site, on_delete=models.CASCADE)
How can I display all quotes from this site?
Many Thanks,
chantiercomes from?