You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 line
542 B

  1. # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
  2. # MIT License. See license.txt
  3. from __future__ import unicode_literals
  4. import urllib
  5. import webnotes
  6. import webnotes.webutils
  7. from webnotes.utils import get_request_site_address
  8. def get_context():
  9. """generate the sitemap XML"""
  10. links = webnotes.webutils.get_website_sitemap().items()
  11. host = get_request_site_address()
  12. for l in links:
  13. l[1]["loc"] = urllib.basejoin(host, urllib.quote(l[1].get("page_name", l[1]["link_name"])))
  14. return {
  15. "links": [l[1] for l in links]
  16. }