Py学习  »  公告

本站部分JS和CSS采用django-compressor进行压缩

Py站长 • 10 年前 • 4969 次点击  

感谢 @lzjun567 的建议,

django-compressor可以将若干个CSS或JS文件整合成一个文件,以提高网站的载入速度。

安装方法简述:

  • 先安装 django-appconf

https://pypi.python.org/pypi/django-appconf/

  • 安装 BeautifulSoup

https://pypi.python.org/pypi/BeautifulSoup/3.2.1

  • 安装 django-compressor

http://django-compressor.readthedocs.org/en/latest/quickstart/#installation

使用方法可参见:http://django-compressor.readthedocs.org/en/latest/usage/

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/447
 
4969 次点击  
文章 [ 2 ]  |  最新文章 10 年前
BeginMan
Reply   •   1 楼
BeginMan    10 年前

Oh,I see.

BeginMan
Reply   •   2 楼
BeginMan    10 年前

“django-compressor可以将若干个CSS或JS文件整合成一个文件??” 原理是什么呢?不同格式的文件整合成一个文件,html怎么处理呢?还是Django渲染???