With APPEND_SLASH set to True, the routes below are for a Django app that maintains movie archives.

from django.urls import path
from . import views

urlpatterns = [
    path('movies/2000/', views.new_millenium),
    path('movies/<int:year>/', views.by_year),
    path('movies/<int:year>/<int:month>/', views.by_year_month),
    path('movies/<int:year>/<int:month>/<slug:other>/', views.by_year_month_detail),
]

Which options are correct for the given routes?

(Select all acceptable answers.)

/movies/2005/03/ will match the third entry in the urlpatterns.
/movies/NineteenHundred/ will match the second entry in the urlpatterns.
/movies/2000/ will match the second entry in the urlpatterns.
/movies/2000 will match the first entry in the urlpatterns.
/movies/2021/12/action/ will match the 4th entry in the urlpatterns.
/movies/2010/January/ will match the third entry in the urlpatterns.
   

Tags
Django URL Routing New Public
Easy

3min

Would you like to see our other questions?

We have 1000+ premium hand-crafted questions for 160+ job skills and 20+ coding languages. We prefer questions with small samples of actual work over academic problems or brain teasers.

Visit our question library
Private Concierge

Send us an email with an explanation of your testing needs and a list of candidates. We will create an appropriate test, invite your candidates, review their results, and send you a detailed report.

Contact Private Concierge

Would you like to see our tests? The following tests contain Django related questions:
On the TestDome Blog

Screening Applicants: The Good, the Bad and the Ugly

Since we’re all biased and we use incorrect proxies, why not just outsource hiring to experts or recruitment agencies? After all, they’ve been screening people for many years, so they must know how to do it right?

Not really. I was surprised to discover that many experts disagree with each other. Everybody praises their pet method and criticizes the others. Many of these methods look legitimate, but are based on...

Dashboard Start Trial Sign In Home Tour Tests Questions Pricing