Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

22 строки
588 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"]).encode("utf-8")))
  14. return {
  15. "links": [l[1] for l in links if not l[1].get("no_sitemap")]
  16. }