My application has many routes that use the same set of static files.
I need to define them for each route as follows:
css_reset = url_for("static", filename="reset.css") css_main = url_for("static", filename="main.css") css_fonts = url_for("static", filename="fonts.css") js_jquery = url_for("static", filename="jquery-1.7.2.min.js") js_main = url_for("static", filename="main.js")
And then when I create the template, it looks like this:
return render_template("person.html", css_main=css_main, css_reset=css_reset, css_fonts=css_fonts, js_jquery=js_jquery, js_main=js_main)
I am new to jar and python and I think that what I am doing is a little funny. Can I define them in one place and then simply use them in my templates without copying and pasting in each route definition?
Buddy source share