Git Product home page Git Product logo

Comments (4)

evansd avatar evansd commented on September 7, 2024

No, it doesn't; this is by design. WhiteNoise is only intended to be used for serving a fixed set of static assets in production. In this case, adding or modifying static files always involves re-deploying and restarting the application.

I'll admit that the docs do need to be clearer on this though. The funny thing about open source is that you find people start using your project in ways you never imagined it being used!

I've added a separate ticket (#19) to document this better.

from whitenoise.

thenewguy avatar thenewguy commented on September 7, 2024

I am serving static files and I am attempting to do so in a production environment.

I was very excited to find this project because I could get away from project specific nginx configurations and handle everything with application code. It is doing great for most of the static files. But it can't serve these few files detailed below and requires using something like nginx which sort of defeats the purpose of adding WhiteNoise to a project.

If automatic recognition wont be added, is there any chance of getting some sort of hook to trigger this manually?

What do you suggest when using something like django-compressor? I am using offline compression for most of my files, but it cannot compress a few of the files offline and they are generated when the page is requested for the first time.

Another use for watching the filesystem would be building static files on one server and pushing them to a remote storage system. When the application gets a request for a static file it pulls the file to the local file system and serves it with WhiteNoise. This is nice because bundling all static files into the application deployment archive can add significantly to the size if some of the static files are large images or videos.

from whitenoise.

evansd avatar evansd commented on September 7, 2024

Not ignoring your points here, just busy with other stuff at the moment! I've had other people request something similar so I'll have a think about the best of way of handling this.

from whitenoise.

evansd avatar evansd commented on September 7, 2024

WhiteNoise v2.0 now supports an autorefresh option which will pick up changes to files after the server has been started. This is designed for development use and I don't recommend it for production, but the feature's now there if you want to use it.

from whitenoise.

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.