Q. Which of the following is a valid way to define a URL pattern?

  • (A) urlpath('home/', views.home)
  • (B) path('home/', views.home)
  • (C) route('home/', views.home)
  • (D) url('home/', views.home)
πŸ’¬ Discuss
βœ… Correct Answer: (B) path('home/', views.home)
Explanation: path is the standard way to define URL patterns in Django 2.0+.
Explanation by: Mr. Dubey
path is the standard way to define URL patterns in Django 2.0+.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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