Setting up STATIC_URL dynamically for Git users
STATIC_URL dynamically with a varying path component. With the dynamically changing URL, whenever the code is updated, the visitor's browser will force loading of all-new uncached static files. In this recipe, we will set a dynamic path for
STATIC_URL when you use the Git version control system.
Make sure that your project is under the Git version control and you have
BASE_DIR defined in your settings, as shown in the Defining relative paths in the settings recipe.
If you haven't done it yet, create the
utils module in your Django project. Also, create ...