[フレーム]
Last Updated: February 25, 2016
·
362
· javierwilson

django template with vim: replace static references in html

Using more elegant option {% static "my_file" %}. See https://docs.djangoproject.com/en/1.8/howto/static-files/

To replace all instances os src="./img/my_image.jpg"...

:%s/src="\.\(.\{-}\)"/src="{% static '1円' %}"/g

To replace all instances os href="./css/my_style.css"...

:%s/href="\.\(.\{-}\)"/href="{% static '1円' %}"/g

AltStyle によって変換されたページ (->オリジナル) /