2

I'm using pyjade in my django project. I also started using django compressor and for performance issues I need to use the offline compression.

I set the COMPRESS_OFFLINE to True in my settings.file

I ran the command: "manage.py compress --extension=jade" to generate the precompiled files and the manifest.json file.

The problem is that when I try to render the page, django raises an exception:

OfflineGenerationError at /new/

You have offline compression enabled but key "093e0a9554a11080f060c52450f54fc1" is missing    from offline manifest. You may need to run "python manage.py compress".

I checked my manifest, here it is:

{ "608f1d299c1a9d4141630b7ebb668456": "" }

Here is my jade template

doctype 5

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

html(lang="es")
  head
    meta(charset="utf-8")
    title my page {% block title %} {%endblock%}

    {% compress css %}
    link(rel="stylesheet", href="{% static 'css/style.css' %}")
    {% endcompress %}

Any thoughts?

ignacio.munizaga
  • 1,553
  • 1
  • 23
  • 28

1 Answers1

0

Have you set django.conf.settings.COMPRESS_OFFLINE to True before running python manage.py compress? The key the template is expecting seems to be different from the key in the manifest. There is a chance things might just be out of sync.

Pratik Mandrekar
  • 9,362
  • 4
  • 45
  • 65
  • Yes, I have already set the COMPRESS_OFFLINE to True. If not the compress command raises an error. – ignacio.munizaga Nov 28 '14 at 16:12
  • The different hashes generated indicate that something is wrong with the inline css. Can you check to see that it is not a server 500 error? If an error page is being rendered the hash will be different from what is expected. Did you check the issues here - https://github.com/django-compressor/django-compressor/issues/169 – Pratik Mandrekar Nov 28 '14 at 17:28