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
πŸ’¬ Discuss
βœ… Correct Answer: (C) Returns absolute path for URL
Explanation: `get_absolute_url()` is used to return the canonical URL for an object.
Explanation by: Mr. Dubey
`get_absolute_url()` is used to return the canonical URL for an object.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
116
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
92%
Success Rate