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

20 строки
560 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. host = get_request_site_address()
  11. links = []
  12. for l in webnotes.conn.sql("""select * from `tabWebsite Sitemap` where ifnull(no_sitemap, 0)=0""",
  13. as_dict=True):
  14. links.append({"loc": urllib.basejoin(host, urllib.quote(l.page_name.encode("utf-8")))})
  15. return links