fix: generate csrf_token and add as context to crm.html

This commit is contained in:
Shariq Ansari 2023-08-10 20:46:19 +05:30
parent 1e8c40fd43
commit a60301f786

14
crm/www/crm.py Normal file
View File

@ -0,0 +1,14 @@
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors
# GNU GPLv3 License. See license.txt
from __future__ import unicode_literals
import frappe
no_cache = 1
def get_context(context):
csrf_token = frappe.sessions.get_csrf_token()
frappe.db.commit()
context.csrf_token = csrf_token