您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

22 行
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. }