Last active
August 13, 2020 03:07
-
-
Save leopard627/43c33d03172c1a6dc7268ddc918cc1ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Movie(models.Model): | |
title = models.CharField() | |
rate = models.FloatField() | |
...... | |
.... | |
... | |
....... | |
q1 = Movie.objects.filter(rate=1.0).count() | |
q2 = Movie.objects.filter(rate=2.0).count() | |
q3 = Movie.objects.filter(rate=3.0).count() | |
q4 = Movie.objects.filter(rate=4.0).count() | |
q5 = Movie.objects.filter(rate=5.0).count() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment