2

cssファイルを圧縮するためにdjango-compressorを使用しています。

http://django-compressor.readthedocs.org/en/latest/quickstart/で説明されているとおりに実行しました

テンプレートファイルを次のように変更しました。

{% 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>

.....

今まで何の変化も見られません。エラーなし。ファイルは圧縮されていません。これを変更するにはどうすればよいですか?

私の設定ファイルでは:

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',
)

どんな助けにも感謝します。ありがとう

4

1 に答える 1