I would like to use get_queryset() with Class Based View but I don't overcome to display variables in my template.
The function is very simple :
class MyClassView(LoginRequiredMixin, ListView) :
template_name = 'my_template.html'
model = Foo
def get_queryset(self) :
foo = Foo.objects.order_by('-id')
bar = foo.filter(Country=64)
return foo, bar
And my template :
<table style="width:120%">
<tbody>
<tr>
<th>ID</th>
</tr>
{% for item in foo %}
<tr>
<td>{{ foo.id }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<br></br>
<table style="width:120%">
<tbody>
<tr>
<th>ID</th>
</tr>
{% for item in bar %}
<tr>
<td>{{ bar.id }}</td>
</tr>
{% endfor %}
</tbody>
</table>
I have to use Context dictionary ?