Open Globegitter opened 11 years ago
I created a gist example: https://gist.github.com/4579043
You can use a ResourceManager
to handle it, but you still need static_file
to serve these files. It is not recommended to use static_file
to serve your JavaScript and CSS files.
Ah, thanks for the example. So what is recommended for serving js and CSS files? I only found examples using static_file and get_url e.g. http://stackoverflow.com/questions/6978603/how-to-load-a-javascript-or-css-file-into-a-bottlepy-template
In production, you may use a better server to handle these static files, but it is fine for small apps. Sorry, this unrelated comment was not good here. =)
Hey, I just got started with bottlepy and am looking for a way to provide static files, such as bootstrap.css or jQuery. I did find a way with static_file and app.get_url. Though I am just curious, would it be possible to do the same thing with ResourceManager as well? There is not much documentation on it and I couldn't really find any examples. It would be great if there would be some example for that (if it is for what I think it is).