Problems linking to static files in Django 1.3

前端 未结 2 891
别那么骄傲
别那么骄傲 2021-02-09 13:39

I\'m running django 1.3, python 2.7 on windows XP

I\'m trying to setup a css in a static folder for my django app.

The template looks like:



        
2条回答
  •  后悔当初
    2021-02-09 14:18

    I bet you have your app running at http://localhost:8000, not http://localhost :)

    Change

    STATIC_URL = 'http://localhost/static/'
    

    to

    STATIC_URL = '/static/'
    

    No need for absolute URL there.

提交回复
热议问题