|
|
@@ -283,6 +283,12 @@ def throw(msg, exc=ValidationError): |
|
|
|
:param exc: Exception class. Default `frappe.ValidationError`""" |
|
|
|
msgprint(msg, raise_exception=exc) |
|
|
|
|
|
|
|
def emit_js(js, user=False, **kwargs): |
|
|
|
from frappe.async import publish_realtime |
|
|
|
if user == False: |
|
|
|
user = session.user |
|
|
|
publish_realtime('eval_js', js, user=user, **kwargs) |
|
|
|
|
|
|
|
def create_folder(path, with_init=False): |
|
|
|
"""Create a folder in the given path and add an `__init__.py` file (optional). |
|
|
|
|
|
|
|