Coder Social home page Coder Social logo

Comments (5)

jrief avatar jrief commented on July 22, 2024

From a quick look at the code, this seems to be a bug.

Just for my better understanding, this only is a problem during production, and not during development?

This means that ./manage.py compilescss does not deploy correctly. One way to handle this, is to compile the .*scss files into .*css as siblings, so that they are located side by side in the same directory. Afterward deploy them using ./manage.py collectstatic.

from django-sass-processor.

AnnaDamm avatar AnnaDamm commented on July 22, 2024

No, this already happens in development mode, when I have the static files hosted already somewhere, as soon as I set the STATIC_URL to some complete url, it is not working.

For example, my file is at /static/css/base.scss, and i set the url to http://example.com/static, then in the template, using sass_src, it is translated just to /static/css/base.css, which returns a 404 error.

from django-sass-processor.

jrief avatar jrief commented on July 22, 2024

Just tested locally by replacing STATIC_URL with http://localhost:8000/static/. Inside the rendered HTML, the URLs starts correctly with http://localhost:8000/static/..., however Django's runserver doesn't deliver them.

The docs on https://docs.djangoproject.com/en/1.10/howto/static-files/#serving-static-files-in-development state:

This helper function works only in debug mode and only if the given prefix is local (e.g. /static/) and not a URL (e.g. http://static.example.com/).

therefore, using such a setting during development, probably is out of Django's use case.

from django-sass-processor.

jrief avatar jrief commented on July 22, 2024

@Arany can I close this?

from django-sass-processor.

AnnaDamm avatar AnnaDamm commented on July 22, 2024

Hm, okay. I guess I did something wrong, as i can now get it to work. Thx for the help anyways :-)

from django-sass-processor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.