fix: generate csrf_token and add as context to crm.html
This commit is contained in:
parent
1e8c40fd43
commit
a60301f786
14
crm/www/crm.py
Normal file
14
crm/www/crm.py
Normal 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
|
||||||
Loading…
x
Reference in New Issue
Block a user