Created
September 23, 2015 10:18
-
-
Save wolph/8d06648181cfa036b855 to your computer and use it in GitHub Desktop.
Regular expression (Perl pie) to search and replace Django STATIC_URL with the static (from staticfiles) templatetag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl -pi -e 's/"\{\{\s*STATIC_URL\s*\}\}\/?([^"]+)"/"{% static \x27$1\x27 %}"/g' templates/***/*.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment