seitime-frappe/frappe/www/robots.py
Aditya Hase 837bfc0995 fix(unicode): Import unicode_literals in every file (#6805)
* fix(unicode): Import unicode_literals in every file

* fix(unicode): Test if safe_json_loads return unicode instead of bytes
2019-01-25 11:56:27 +05:30

12 lines
356 B
Python

from __future__ import unicode_literals
import frappe
no_sitemap = 1
base_template_path = "templates/www/robots.txt"
def get_context(context):
robots_txt = (
frappe.db.get_single_value('Website Settings', 'robots_txt') or
(frappe.local.conf.robots_txt and frappe.read_file(frappe.local.conf.robots_txt)) or '')
return { 'robots_txt': robots_txt }