S

Shyam Dubey • 3.70K Points
Extraordinary

Q. Which of the following is used to add extra context data to a Django class-based view?

  • (A) extra_context
  • (B) add_context()
  • (C) get_context_data()
  • (D) context()
  • Correct Answer - Option(C)
  • Views: 4
  • Filed under category Django
  • Hashtags:

Explanation by: Shyam Dubey
get_context_data() is overridden to add extra data to the context in class-based views.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.