Coder Social home page Coder Social logo

Comments (11)

dgourley avatar dgourley commented on July 22, 2024 1

@cdriehuys you need to define your own storage class and define the base_url for your s3 configuration. Something like....

In your yourapp/settings.py set your static files storage:

STATICFILES_STORAGE = 'yourapp.storage.YourStorage'

Then define it in yourapp/storage.py

from storages.backends.s3boto import S3BotoStorage
class YourStorage(S3BotoStorage):
base_url = 'yourbucket.s3.amazonaws.com'

from django-sass-processor.

jrief avatar jrief commented on July 22, 2024

@cdriehuys Please provide a pull request fixing this. Otherwise, please contact me on my private email address.

from django-sass-processor.

cdriehuys avatar cdriehuys commented on July 22, 2024

Sorry for the delayed response. Unfortunately I don't have the time to make a pull request for this currently, but I appreciate you taking the time to look at this issue.

from django-sass-processor.

jrief avatar jrief commented on July 22, 2024

@cdriehuys If you can fund this feature, I can do it for you. Currently I have no plans to use AWS with S3, so it's not on my personal "to do" list.

from django-sass-processor.

jrief avatar jrief commented on July 22, 2024

@dgourley I haven't been aware of this. Could you please add this to the README and open a pull request.

from django-sass-processor.

dgourley avatar dgourley commented on July 22, 2024

@jrief will do. I just ran into this issue last night and found this as a workaround. Seems S3BotoStorage doesn't have base_url defined... easy enough to add the configuration. If you are using s3 you probably are defining a storage anyway to enable caching, manifest files, etc.

from django-sass-processor.

cdriehuys avatar cdriehuys commented on July 22, 2024

@dgourley Thanks for the workaround. I avoided the issue by switching to a different build process, but I'll definitely use that solution on future projects.

from django-sass-processor.

jrief avatar jrief commented on July 22, 2024

@cdriehuys Can this issue be closed then?

from django-sass-processor.

cdriehuys avatar cdriehuys commented on July 22, 2024

Yes. I think the provided solution is easy enough to follow that this doesn't need to be fixed in the package itself.

from django-sass-processor.

AlBlanc avatar AlBlanc commented on July 22, 2024

Actually the issue is: django-sass-processor is trying to read the base_urlof each django apps storage classes.

But base_url is an attribute of FileStorage, so django-sass-processor assumes we must use a FileStorage and block us from using some other storage classes like one provided by django-storages which override Storage class (which is FileStorage superclass)

I really think a quick fix could help a lot of people. I'll try to take some time during this week to push a pull request. For the moment, i'll take the workaround above. Thank you!

from django-sass-processor.

jrief avatar jrief commented on July 22, 2024

@AlBlanc if you can fix this, it would be great. Currently I have no use-case for this, hence that's not on my priority list.

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.