fix: pass path in hooks instead of function
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from . import __version__ as app_version
|
from . import __version__ as app_version
|
||||||
|
import frappe
|
||||||
|
|
||||||
app_name = "school"
|
app_name = "school"
|
||||||
app_title = "School"
|
app_title = "School"
|
||||||
@@ -188,6 +189,6 @@ page_renderer = [
|
|||||||
# set this to "/" to have profiles on the top-level
|
# set this to "/" to have profiles on the top-level
|
||||||
profile_url_prefix = "/users/"
|
profile_url_prefix = "/users/"
|
||||||
|
|
||||||
custom_signup_form = "school.plugins.show_custom_signup"
|
custom_signup_form = "school/templates/signup-form.html" if frappe.db.get_single_value("LMS Settings", "verify_age") else None
|
||||||
|
|
||||||
on_login = "school.overrides.user.set_country_from_ip"
|
on_login = "school.overrides.user.set_country_from_ip"
|
||||||
|
|||||||
@@ -109,8 +109,3 @@ def youtube_video_renderer(video_id):
|
|||||||
|
|
||||||
def video_renderer(src):
|
def video_renderer(src):
|
||||||
return "<video controls width='100%'><source src={0} type='video/mp4'></video>".format(src)
|
return "<video controls width='100%'><source src={0} type='video/mp4'></video>".format(src)
|
||||||
|
|
||||||
def show_custom_signup():
|
|
||||||
if frappe.db.get_single_value("LMS Settings", "verify_age"):
|
|
||||||
return "school/templates/signup-form.html"
|
|
||||||
return None
|
|
||||||
|
|||||||
Reference in New Issue
Block a user