Answer the question
In order to leave comments, you need to log in
Why is the request processed in the wrong pattern?
The request http://127.0.0.1:8000/flashcards/
is being processed in the wrong pattern. Writes
1 pattern(s) tried: ['flashcards/(?P<deck_id>[0-9]+)/$']
, but I would like it to be processed by the first application pattern. urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^flashcards/', include('flashcards.urls')),
]
urlpatterns = [
url(r'^$', views.deck_choice, name='deck_choice'),
url(r'^(?P<deck_id>[0-9]+)/$', views.question_in_deck, name='question_in_deck'),
]
Answer the question
In order to leave comments, you need to log in
and so? make the first pattern in the application urlsurl(r'$', views.deck_choice, name='deck_choice'),
what version of junga are you using?
you have written under version 1.8, and no jambs are visible, if an earlier version is used, then it can lead to problems.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question