Problems linking to static files in Django 1.3

前端 未结 2 739
悲&欢浪女
悲&欢浪女 2021-02-09 13:44

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条回答
  •  梦毁少年i
    2021-02-09 14:36

    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.

提交回复
热议问题