feat: added get_profile_url function to get the profile url in templates
This takes care of generating the correct profile URL depending on the `profile_url_prefix` setting. Issue #192
This commit is contained in:
@@ -17,13 +17,6 @@ from frappe.website.page_renderers.template_page import TemplatePage
|
||||
from frappe.website.page_renderers.web_form import WebFormPage
|
||||
|
||||
|
||||
def update_website_context(context):
|
||||
"""Adds get_profile_url to context
|
||||
|
||||
Specified in the hooks.
|
||||
"""
|
||||
context.get_profile_url = get_profile_url
|
||||
|
||||
def get_profile_url(username):
|
||||
"""Returns the profile URL given username.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user