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:
Anand Chitipothu
2021-09-07 16:57:35 +05:30
parent 77c4b53b71
commit a0b77f5d08
9 changed files with 13 additions and 15 deletions

View File

@@ -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.