Skip to content

Instantly share code, notes, and snippets.

@marcesher
Created March 13, 2013 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcesher/5151652 to your computer and use it in GitHub Desktop.
Save marcesher/5151652 to your computer and use it in GitHub Desktop.
regex search/replace for django direct_to_template and redirect_to upgrade in 1.5
direct_to_template, \{'template':(.*?)}
TemplateView.as_view(template_name=$1)
redirect_to, \{'url': (.*?)}
RedirectView.as_view(url=$1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment