You should use static and {% load static from staticfiles %},
like this:
{% load static from staticfiles %}
<script src="{% static 'scripts/main.js' %}"></script>
NOTE: This is NOT suggested in Deploy/Production service.
REF: https://docs.djangoproject.com/en/1.10/howto/static-files/#serving-static-files-during-development
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [ ... ]
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) # static
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # media file
You have to set STATIC_URL and STATIC_ROOT in your settings.py before add those to urls.py.
NOTE: This works with DEBUG=False in settings.py
You have to run runserver --insecure to let django serve static files.
So you can add with this:
<script src="/static/scripts/main.js"></script>
/static/ may be replaced with your STATIC_URL