Answer the question
In order to leave comments, you need to log in
Why can't find url "/search/" in django in html file?
Hi everybody!
Who can tell me why it does not find the url "/search/" in django?
"/search/" is highlighted and no
url is found "/search/" is defined in url.py
file "html" file
<body>
<form action="/search/" method="get">
<input type="text" name="q">
<input type="submit" value="Найти">
</form>
</body>
urlpatterns = [
###
path('', views.IndexView.as_view(), name='index'),
path('search/', views.search, name='search'),
###
]
<body>
<form action="http://127.0.0.1:8000/polls/search/" method="get">
<input type="text" name="q">
<input type="submit" value="Найти">
</form>
</body>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question