{"id":230,"date":"2009-01-04T13:57:18","date_gmt":"2009-01-04T18:57:18","guid":{"rendered":"http:\/\/www.kralidis.ca\/blog\/?p=230"},"modified":"2009-01-04T13:57:18","modified_gmt":"2009-01-04T18:57:18","slug":"python-templating","status":"publish","type":"post","link":"https:\/\/www.kralidis.ca\/blog\/2009\/01\/04\/python-templating\/","title":{"rendered":"Python templating"},"content":{"rendered":"<p>Awhile back, I started using <a title=\"Genshi\" href=\"http:\/\/genshi.edgewall.org\/\">Genshi<\/a> as a templating solution for some Python application development.\u00a0 Easy to use, we were able to come up with a <a title=\"SensorML\" href=\"http:\/\/www.opengeospatial.org\/standards\/sensorml\">SensorML<\/a> generator for description and discovery of monitoring stations.<\/p>\n<p>Lately, I&#8217;ve been <a title=\"helping out\" href=\"\/blog\/2008\/12\/29\/shiny-new-mapserver-website\/\">helping out<\/a> a bit on the new MapServer website, driven by <a title=\"Sphinx\" href=\"http:\/\/sphinx.pocoo.org\/\">Sphinx<\/a>.\u00a0 Digging deeper, I noticed Sphinx using <a title=\"Jinja2\" href=\"http:\/\/jinja.pocoo.org\/2\/\">Jinja2<\/a> for templating, so I tried this out a bit.\u00a0 Not bad either!<\/p>\n<p>Templating is key to many applications, and I wonder how these differ.\u00a0 Perhaps the geo\/python gurus out there have some further insight.<\/p>\n<link rel=\"stylesheet\" href=\"http:\/\/cdn.leafletjs.com\/leaflet-0.5\/leaflet.css\" \/>\n<!--[if lte IE 8]>\n  <link rel=\"stylesheet\" href=\"http:\/\/cdn.leafletjs.com\/leaflet-0.5\/leaflet.ie.css\" \/>\n<![endif]-->\n<script src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.5\/leaflet.js\"><\/script>\n<style type=\"text\/css\">#map230 { width: 300px; height: 200px; }<\/style>\n\n<div id=\"map230\"><\/div>\n<script type=\"text\/javascript\">\n  var map230 = L.map('map230').setView([43.620495, -79.513198], 10);\n  L.tileLayer('http:\/\/{s}.tile.osm.org\/{z}\/{x}\/{y}.png', {\n      attribution: '&copy; <a href=\"http:\/\/osm.org\/copyright\">OpenStreetMap<\/a> contributors'\n  }).addTo(map230);\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Awhile back, I started using Genshi as a templating solution for some Python application development.\u00a0 Easy to use, we were able to come up with a SensorML generator for description and discovery of monitoring stations. Lately, I&#8217;ve been helping out a bit on the new MapServer website, driven by Sphinx.\u00a0 Digging deeper, I noticed Sphinx [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,3,11],"tags":[],"class_list":["post-230","post","type-post","status-publish","format-standard","hentry","category-open-source","category-technology","category-web"],"_links":{"self":[{"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/posts\/230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/comments?post=230"}],"version-history":[{"count":2,"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/posts\/230\/revisions"}],"predecessor-version":[{"id":233,"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/posts\/230\/revisions\/233"}],"wp:attachment":[{"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/media?parent=230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/categories?post=230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/tags?post=230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}