Questions tagged [django-compressor]

Django Compressor is a pluggable django app that combines and compresses linked and inline Javascript or CSS in a Django templates into cacheable static files by using the compress template tag

Django Compressor is a pluggable django app that combines and compresses linked and inline Javascript or CSS in a Django templates into cacheable static files by using the compress template tag.

200 questions
29
votes
4 answers

How to configure django-compressor and django-staticfiles with Amazon's S3?

I'm trying to setup django-compressor and django-staticfiles so that the compressed CSS/Javascript and images are served from Amazon's S3. I've managed to setup staticfiles using S3 as the backend so it's collectstatic command sends the files to S3…
ghickman
  • 5,893
  • 9
  • 42
  • 51
24
votes
5 answers

Django-Compressor throws UncompressableFileError

I'm using django-compressor and django-staticfiles (the external version, I'm on Django 1.2). When I try to load my site, I get an error: TemplateSyntaxError: Caught UncompressableFileError while rendering: 'css/facebox.css' isn't accesible via…
Chris Lawlor
  • 47,306
  • 11
  • 48
  • 68
18
votes
6 answers

Django-compressor: how to write to S3, read from CloudFront?

I want to serve my compressed CSS/JS from CloudFront (they live on S3), but am unable to work out how to do it via the compressor settings in settings.py, I have the following: COMPRESS_OFFLINE = True COMPRESS_URL =…
Matt Parrilla
  • 3,171
  • 6
  • 35
  • 54
16
votes
3 answers

django-compressor not setting absolute CSS image paths on Heroku

I'm using django-compressor to concatenate and compress my CSS and JS files on this site. I'm serving static files from an S3 bucket. On my local copy of the site, using a different S3 bucket, this all works perfectly. But on the live site, hosted…
Phil Gyford
  • 13,432
  • 14
  • 81
  • 143
14
votes
2 answers

Django AWS S3 using Boto with Compressor fails to compress UncompressableFileError

Following this guide, and these [1] [2] posts, I have tried to setup static storage on AWS S3 using django-storages Boto. When executing collectstatic, the command succesfully collects at the STATIC_ROOT. However, the files are not uploaded to S3…
Tui Popenoe
  • 2,098
  • 2
  • 23
  • 44
14
votes
3 answers

How to setup django-compressor on heroku, offline compression to S3

I followed every QA suggestions found on SO and in different blogs, Everything works ok on my dev machine and nothing works on heroku. here are my settings: DEFAULT_FILE_STORAGE = 'arena.utils.MediaRootS3BotoStorage' # media files #…
Neara
  • 3,693
  • 7
  • 29
  • 40
14
votes
3 answers

Python/Tornado - compressing static files

For django projects there is an awesome tool called django-compressor. It combines all js or css files under compress template tag into single cached file, like this: {% load compress %} {% compress css %}
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
13
votes
2 answers

Django Compressor does not minify files

I am trying to let django-compressor working with mezzanine. For first attempt I simply installed django compressor (as should be done for Mezzanine) and changed DEBUG = False but nothing changed in HTML generated from Django. So I followed the…
Appost
  • 329
  • 3
  • 11
11
votes
3 answers

How to use django-compressor behind load balancer?

I have two servers behind a load balancer. Each server is running a memcached server and the settings file (which is identical on both servers) has them both defined (in short: shared cache). I want the paths to the generated files to be identical…
demux
  • 4,544
  • 2
  • 32
  • 56
11
votes
2 answers

Django no module named "compressor"

I'm trying to create a super user using cmd but every time I run the command I get: C:\Users\PCDOM\Desktop\Power\pm_app>python manage.py syncdb Traceback (most recent call last): File "manage.py", line 17, in
john
  • 3,949
  • 7
  • 34
  • 56
11
votes
3 answers

Is it possible to use django_compressor/S3/gzip?

How is it possible to use django_compressor to send gziped files to Amazon S3? I tried in several ways but it didn't work. Here is my last settings.py configuration: COMPRESS_ENABLED = True COMPRESS_OFFLINE = True COMPRESS_ROOT =…
Thomas
  • 2,256
  • 6
  • 32
  • 47
10
votes
2 answers

Django compress error: Invalid input of type: 'CacheKey'

We suddenly started getting this issue when compressing django static files on production servers. Ubuntu 16.04, Python 3.x, Django 1.11. I am using an ansible-playbook to deploy. The error is as follows: CommandError: An error occurred during…
nael
  • 1,441
  • 19
  • 36
10
votes
2 answers

Django UncompressableFileError

I am using Amazon S3 bucket to store my static files. And I have compressor app in Django to compress all the static files. Django gives me error: 'home_page/css/bootstrap.min.css' isn't accessible via COMPRESS_URL…
Piyush Aggarwal
  • 172
  • 3
  • 11
10
votes
5 answers

Django Sass Compressor django_libsass.SassCompiler: command not found

I'm using a Django-Compressor Filter as part of Wagtail (Django variant CMS with super cool UI). Environment is Wagtail 0.2 + Python 2.7 + Django 1.6 + Virtualenv + FastCGI + Apache shared hosting. Issue occurs when trying to access admin/login page…
moshushi
  • 391
  • 2
  • 4
  • 15
9
votes
2 answers

What should my LESS @import path be?

Here's the scenario: I'm running Django 1.3.1, utilizing staticfiles, and django-compressor (latest stable) to, among other things, compile LESS files. I have an "assets" directory that's hooked into staticfiles with STATICFILES_DIRS (for…
Chris Pratt
  • 232,153
  • 36
  • 385
  • 444
1
2 3
13 14