I have a website and I want to create a dynamic sitemap for it. I use Google App Engine with Python and Django.

I developed another website using PHP and the sitemap.xml was accessable because of this Rewrite Rule I wrote on the .htaccess of the Apache Server.

`RewriteRule (.*)\.xml(.*) $1.php$2 [nocase]`

The .xml file was generated like this:

`$sql_select ="SELECT titulo, title, data_insercao FROM livros l ORDER BY titulo ASC";  

$result = mysql_query($sql_select) or die(mysql_error());  

while($row = mysql_fetch_array($result)) {  

 $titulo = $row['titulo'];  

 $title = $row['title'];  

 $data = $row['data_insercao'];  

 $sql_comentario ="SELECT data FROM comentarios WHERE livros_title = '" . $title . "' order by data desc LIMIT 0 , 1";  

 $result_comentario = mysql_query($sql_comentario) or die(mysql_error());  

 $row_comentario = mysql_fetch_array($result_comentario);  

 if($row_comentario){  

 $data = $row_comentario['data'];  

 }  

 $pieces = explode(" ", $data);  

 $data = $pieces[0];  

 $url_product = 'http://www.sinopsedolivro.net/livro/' . $title . '.html';  

 echo  

' <url>  

 <loc>'.$url_product.'</loc>  

 <lastmod>'.$data.'</lastmod>  

 <changefreq>weekly</changefreq>  

 <priority>0.8</priority>  

 </url>  

 ';  

}`
Is there any option for my case (GAE + Python) so when one access www.mydomain.com/sitemap.xml, he will receive from the server a .xml file with the dynamicaly content generate myself using python?