'How to find static files using regex in django in view?
I have django project that has a staticfile with the structure
staticfiles/bundles/static/js/main.[hash of 8 random characters].js
I want to get the name of main.[hash].js in my view. Though I can use python glob to find such file but is there any clean way that is specific to django that I can use to find such file.
Maybe using regex with django.contrib.staticfiles.finders ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|