Skip to content

Instantly share code, notes, and snippets.

@waylybaye
Last active December 15, 2015 03:29
Show Gist options
  • Save waylybaye/5194766 to your computer and use it in GitHub Desktop.
Save waylybaye/5194766 to your computer and use it in GitHub Desktop.
migrate old django `url` templatetag to new style Django 1.5 url
find . -name "*.html" -exec sed -i "" -e 's/{% *url *\([a-zA-Z0-9_:]*\)/{% url "\1"/g' '{}' \;
@waylybaye
Copy link
Author

find . -name "*.html" -exec sed -i -e 's/{% *url *\([a-zA-Z0-9_:]\+\)/{% url "\1"/g' '{}' \; for linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment