Open noppelmax opened 2 years ago
I thought about simply
pics= pic1.png pic2.png
But yes, having multiple options for template might be helpful in the future...
how are you planning to hand the configuration over? Just supplying a static html with javascript to read the config out of the .ini on its own would be the simplest but maybe not that efficient
?
how does the template know the options set the config.ini? is it included into the template by the server before the file is sent to the client or does it have to fetch() the config.ini itself and then parse it?
example for serverside:
<!-- pic_url -->
-> https://http.cat/200.jpg
Yes sure, the server is populating the templates with values from the config.ini
. I'm on it. :)
how would you do the syntax? funky HTML comments like <!--{config_name_here}-->
that get replaced by the actual value?
i want to make a few templates and having the syntax defined would allow me to stop guessing dumb solutions
But you have to pass the wanted value explicitely in the template call e.g. flask.render_template('home.html', shows = getShows(), version=VERSION)
maybe allow for an option in the config.ini for ex.:
this uses the
1picture.html
file from the_templates
directory located at the root of the pages directory