Upwork All skils Test Answers >> Upwork answers of Django >>Complete Django Quiz Answers
Question: Consider the following code snippet
for a Django Model: class Salary(models.Model): amount =
models.PositiveIntergerField(help_text='eg 8000') retired =
models.BooleanField(help_text='True if above average') …........
Which of the following will correctly produce a QuerySet of all Salary
objects where retired == True and amount != 7300?
The Answer of this quiz is ' from django.db.models import Q results = Salary.filter(~Q(amount=7300),retired=True)'
The Answer of this quiz is ' from django.db.models import Q results = Salary.filter(~Q(amount=7300),retired=True)'
No comments:
Post a Comment