Django Linkedin Answer

A client wants their site to be able to load “Rick & Morty” episodes by number or by title—e.g., shows/3/3 or shows/picklerick. Which URL pattern do you recommend?

  • url(r’shows/int:season/int:episode/’, views.episode_number)
  • path(‘shows/int:season/int:episode/’, views.episode_number),
  • path(‘shows/int:season/int:episode’, views.episode_number),
  • url(r’^show/(?P[0-9]+)/(?P[0-9]+)/$’, views.episode_number),
Neha Dogra

Recent Posts

Abacus Dream Meaning – Top 5 Dreams About Abacus

Have you ever had a dream about an abacus? In a dream, seeing an abacus…

2 months ago

Abalone Dream Meaning

Have you ever had a dream about abalone? It denotes a period of change in…

2 months ago

Abandonment Dream Meaning

Have you ever had a dream about being abandoned? It's time to let go of…

2 months ago

Advice Dream Meaning – Top 5 Dreams About Advice

Did you have any dreams about giving advice? They have to do with action plans…

2 months ago

Avalanche Dream Meaning – Top 8 Dreams About Avalanche

Have you ever had a dream involving an avalanche? In your dream, an avalanche represents…

2 months ago

Acrobat Dream Meaning – Top 8 Dreams About Acrobat

Have you ever fantasised about acrobats or about becoming one? It indicates that you need…

2 months ago