A

Admin • 833.24K Points
Coach

Q. What is the use of `get_absolute_url()` method in models?

  • (A) Returns full database path
  • (B) Returns a view function
  • (C) Returns absolute path for URL
  • (D) Redirects to login page
  • Correct Answer - Option(C)
  • Views: 33
  • Filed under category Django
  • Hashtags:

Explanation by: Admin

`get_absolute_url()` is used to return the canonical URL for an object.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.