Zhong

Keep thinking. Keep moving.

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

很简单,步骤如下:

1、修改配置文件 setting.py 中的STATIC_ROOT为 '/static/'

2、 运行 python manage.py collectstatic , 将静态文件收集到static子目录下,或者手动在子目录下创建static文件夹,放入静态文件

3、修改 config.yaml,其中url的命名可以任意取

handlers:
 - url: /css
   static_dir: /static

4、html中写入

 <link rel="stylesheet" type="text/css" href="/css/text.css"> 

posted on 2014-04-05 03:18  stwzhong  阅读(347)  评论(0编辑  收藏  举报