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

There is no possibility to customize path to static_folder. #30

Open
NordenF opened this issue Apr 15, 2022 · 2 comments
Open

There is no possibility to customize path to static_folder. #30

NordenF opened this issue Apr 15, 2022 · 2 comments

Comments

@NordenF
Copy link

NordenF commented Apr 15, 2022

I have "bundle" and "user_files" subdirectories in my flask "static_folder" diectory.

The "bundle" subdirectory contains the static content of the site (js, css, images), compiled using webpack.

The "user_files" subdirectory contains files uploaded by users, such as avatars and illustrations for blog posts.

I'd like the flask-static-digest extension to only apply to the "static_folder/bundle" subdirectory, not "static_folder/user_files".
At the moment, I don't see a way to set up flask_static_digest like this.

@nickjj
Copy link
Owner

nickjj commented Sep 14, 2022

Hi,

I hear you, what do you think about having a FLASK_STATIC_DIGEST_IGNORE_PATHS: [] which defaults to an empty list but if you want to ignore user uploads or anything else you can do FLASK_STATIC_DIGEST_IGNORE_PATHS: ["user_files", "some/other/ignored/path"]? The path would be relative to your static_folder.

@NordenF
Copy link
Author

NordenF commented Sep 15, 2022

Hi,

I hear you, what do you think about having a FLASK_STATIC_DIGEST_IGNORE_PATHS: [] which defaults to an empty list but if you want to ignore user uploads or anything else you can do FLASK_STATIC_DIGEST_IGNORE_PATHS: ["user_files", "some/other/ignored/path"]? The path would be relative to your static_folder.

I think it will be a good solution!

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

No branches or pull requests

2 participants