nprapps/app-template — pull request #430 by rnagle (2014-11-10 20:23:59+00:00)
Title: Replace Flask's url_for with app_template_url_for

`app_template_url_for` is a little helper function that takes into account the deployment target when building urls. It inserts the project's slug/path prefix when building for staging or prod.

Note that I'm overriding Flask's `url_for` with `app_template_url_for` in app.py.

Also added `static_folder='www/assets'` to the Flask instance so that `{{ url_for('static', filename="some_file.png") }}` works properly when some_file.png is in www/assets/.

I wrote this because I couldn't find a way to configure the Flask object to do this for me. Maybe I'm missing something. Let me know what you think!