I want to use django for a database driven app and I want to know if django models permit me to use complex query to fetch data.
I have for example this table inside a database:
I want to extract data resulting from this query.
SELECT name
FROM movies
WHERE year between 1995 AND 2001
AND rank between 6 and 9;
How can I do it with Django?
Movie.objects.filter(year__range(1995, 2001), rank__range(6, 9))
You can use filters to limit querysets with Django.