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 does related_name on a ForeignKey control?

  1. A The database column name
  2. B The attribute used for the reverse relation from the related model
  3. C The display name in the admin
  4. D The ordering of results
Answer

The attribute used for the reverse relation from the related model

Without it, Django uses modelname_set. A clear related_name makes reverse queries far more readable.

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