added sitemap, rss feeds

This commit is contained in:
Rushabh Mehta
2012-02-07 13:29:31 +05:30
parent 9c7fe3bce4
commit 518533fde0
8 changed files with 111 additions and 39 deletions

19
sitemap.xml Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/python
import cgi, cgitb, os, sys
cgitb.enable()
# import libs
sys.path.append('lib/py')
import webnotes
import webnotes.auth
if __name__=='__main__':
webnotes.http_request = webnotes.auth.HTTPRequest()
domain = os.environ.get('HTTP_HOST')
protocol = os.environ.get('HTTPS') and 'https://' or 'http://'
from webnotes.cms import sitemap
print 'Content-Type: text/xml'
print
print sitemap.generate(protocol + domain + '/')