2014-04-10 2 views
2

저는 CSS 파일을 압축하기 위해 django-compressor를 사용하고 있습니다.Django-Compressor는 아무 것도하지 않습니다

{% load staticfiles %} 
{% load compress %} 

<!DOCTYPE html> 
<html lang="en"> 
    <head> 
    {% compress css %} 
    <link href="{% static "crsq/css/zippednewsapp/bootstrap.readable.min.css" %}" rel="stylesheet"> 
    <link href="{% static "crsq/css/zippednewsapp/zippednewsapp.css" %}" rel="stylesheet"> 
    <link rel="stylesheet" href="{% static "crsq/css/zippednewsapp/typeahead.css" %}"/> 
    {% endcompress %} 
    </head> 

..... 

내가 무엇을 그렇게도 변경이 표시되지 않는 다음과 같이이 http://django-compressor.readthedocs.org/en/latest/quickstart/

에 설명 된대로 내가 한

은 내 템플릿 파일을 변경했습니다. 오류 없음. 파일은 압축되지 않습니다. 어떻게 변경합니까? 내 설정에서

파일 :

DEBUG = False 
TEMPLATE_DEBUG = False 

STATIC_ROOT = '' 

STATIC_URL = '/static/' 

STATICFILES_DIRS = (
) 

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder', 
    'django.contrib.staticfiles.finders.AppDirectoriesFinder', 
    'compressor.finders.CompressorFinder', 
) 

어떤 도움을 주셔서 감사합니다. 고마워

답변

5

html이 변경되지 않으면 변경 후 서버를 다시 시작합니다.

그렇지 않은 경우 로깅 수준을 높이고 압축기 모듈이 로그에 인쇄하는 내용을 볼 수 있습니다.

또한, 압축기 (STATIC_ROOT에있는 기본값)

감사

+0

COMPRESS_ROOT 문제였다 COMPRESS_ROOT에서 파일과 폴더를 만들 충분한 권한이있는 사용자로 실행해야합니다. 감사합니다 –

+2

다른 누구든지이 같은 문제가 발생하면 STATIC_ROOT = 'static'을 settings.py에 추가하여 문제를 해결할 수있었습니다. –

관련 문제