Closed laozhu closed 8 years ago
Hi @laozhu, the static versioning of weppy just add the version to the URLs generated using the url()
method. You just need to add the appropriate variables to your application configuration:
app.config.static_version_urls = True
app.config.static_version = "1.0.0"
Then if you build static urls using url('static', 'yourfile.js')
the final url will be something like: /static/1.0.0/myfile.js
You would need to change your version number whenever you want to update the urls and invalidate the browsers' cache.
If you need something more advanced for assets versioning, you'd better go with the assets pipeline extension :)
Let me know if you need more info.
Sorry for later reply, so static_version_urls
is just a toggle, I got it, Thank you :)
I have been using weppy-Assets
to take care my front-end development, it's awesome tool !
I'm glad to hear that @laozhu, If you don't bother add a star to the weppy-Assets repo: https://github.com/gi0baro/weppy-assets
I'm gonna close this since I've added #115
How does
app.config.static_version_urls
take effect in static url version. I didn't find any docs of this config, so I searched the code and found only the below functionI still couldn't get what this means to my final static url, any help will be appreciated, thanks.