Problems linking to static files in Django 1.3

前端 未结 2 893
别那么骄傲
别那么骄傲 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:35

    I created a folder:

    C:\root\workspace\mysite\src\mysite\common
    

    And in my settings, I have:

    STATIC_ROOT = 'C:/root/workspace/mysite/src/mysite/static/'
    STATIC_URL = '/static/'
    STATICFILES_DIRS = (
        "C:/root/workspace/mysite/src/mysite/common/static",
    )
    

    This seems to work.

提交回复
热议问题