Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What is the purpose of a custom model Manager in Django?

  1. A To manage user permissions
  2. B To encapsulate common query logic so it lives in one place
  3. C To handle file uploads
  4. D To configure the admin site
Answer

To encapsulate common query logic so it lives in one place

A manager such as Order.objects.pending() keeps query logic out of views and prevents the same filter being repeated across the codebase.

All Django MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as