How to set up Django website with jQuery

后端 未结 4 868
遇见更好的自我
遇见更好的自我 2021-01-30 02:25

I don\'t know why, but I couldn\'t figure out how to activate jQuery on my website. All sites doing tutorials \'Starting jQuery on Django\' started with JQuery already working o

4条回答
  •  走了就别回头了
    2021-01-30 03:17

    I put my jquery file in the same place as SaiyanGirl.

    In my setting I had this by default in INSTALLED_APPS: 'django.contrib.staticfiles',

    At the top of my html page I have this:

    {% load static %}
     
    

    I have this in my head tag:

    This is how I tested it (in the head tag too):

    
    

提交回复
热议问题