seitime-frappe/frappe/www/robots.py
2019-03-19 20:34:19 +05:30

11 lines
341 B
Python

from __future__ import unicode_literals
import frappe
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 }