These producers could also be written like this:

```python
file_list = models.File.objects.all()
if filter_query:
    file_list = file_list.filter(name__icontains=filter_query)
return file_list[from_idx:to_idx]
```
Thanks to lazy evaluation the query is not yet executed on the first line, so there's no performance penalty.