Answer the question
In order to leave comments, you need to log in
How to correctly write urlpatterns in django?
I want to receive get parameter in url
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'item', views.item, name='item'),
url(r'^category/(?P<category>\w{0,50})/$', views.category,),
]
<script src="./static/js/jquery-1.11.3.min.js"></script>
http://localhost:8000/category/название/static/js/jquery-1.11.3.min.js
Answer the question
In order to leave comments, you need to log in
So static is not connected ideologically and especially in the way you did it. "./"
means that you are starting from the current location, which is completely wrong in general.
Need like this:
{% load static %}
<script src="{% static "js/jquery-1.11.3.min.js" %}"></script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question