Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS files don't load #34

Closed
Alex-Sichkar opened this issue Mar 29, 2016 · 9 comments
Closed

CSS files don't load #34

Alex-Sichkar opened this issue Mar 29, 2016 · 9 comments

Comments

@Alex-Sichkar
Copy link

Alex-Sichkar commented Mar 29, 2016

If there are no generated CSS files, they are generated but don't load after first dev server start (the browser gets 404). Only after restarting dev server they load.
Django 1.9.3, django-sass-processor 0.3.4

@ghost
Copy link

ghost commented Oct 5, 2016

Would be awesome if this were to be fixed. On our test server we encounter this issue a lot...

@AndreasBackx
Copy link
Collaborator

@jrief do you know what causes this? I haven't come across this problem yet.

@jrief
Copy link
Owner

jrief commented Oct 5, 2016

I actually can't reproduce it, so anybody who is able to reproduce this bug, please spend some time and investigate.

@udhaya0000
Copy link

udhaya0000 commented Oct 9, 2016

While using with django-compressor, When Debug is False, it fails to compile the css.
Ex:

DEBUG = False
TEMPLATE_DEBUG = False
COMPRESS_ENABLED = False

When COMPRESS_ENABLED is true it throughs 500 error.

@AndreasBackx
Copy link
Collaborator

AndreasBackx commented Oct 9, 2016

@udhaya0000 when DEBUG is set to False then you have to compile it beforehand with the compilescss command. This is documented in the README. Use SASS_PROCESSOR_ENABLED if you want it to automatically generate CSS files when DEBUG is set to False in order to generate the CSS files per request.

We are also gonna need more information than the status code. You perhaps configured it badly.

@udhaya0000
Copy link

@AndreasBackx Thanks SASS_PROCESSOR_ENABLED = True works, but python manage.py compilescss gives the following error ImportError: Could not import settings 'app.settings.prod' (Is it on sys.path? Is there an import error in the settings file?): No module named unipath

Also the collectstatic PATTERN not working if I use .scss, but it works if I change it to *.scss

@AndreasBackx
Copy link
Collaborator

@udhaya0000 please provide us with full stacktraces, exception messages are not worth much.

That pattern is working how it should...

@jrief
Copy link
Owner

jrief commented Dec 20, 2016

@Arany reported that this happens if you invoke ./manage.py collectstatic, when the folder referenced by settings.STATIC_ROOT has not been created yet.

@jrief jrief closed this as completed Dec 20, 2016
@RubeRuby
Copy link

It is an old issue, but I experience this too.
First run:
image
Second run:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants