allow template pages to be overriden by apps
This commit is contained in:
parent
2e3030b297
commit
aa428dfe24
2 changed files with 7 additions and 2 deletions
|
|
@ -388,7 +388,8 @@ def get_all_apps(with_webnotes=False):
|
|||
def get_installed_apps():
|
||||
if flags.in_install_db:
|
||||
return []
|
||||
return json.loads(conn.get_global("installed_apps") or "[]")
|
||||
installed = json.loads(conn.get_global("installed_apps") or "[]")
|
||||
return installed
|
||||
|
||||
def get_hooks(app_name=None):
|
||||
def load_app_hooks(app_name=None):
|
||||
|
|
|
|||
|
|
@ -75,7 +75,11 @@ def add_website_sitemap_config(page_or_generator, app, path, fname, basepath):
|
|||
wsc.ref_doctype = getattr(module, "doctype", None)
|
||||
wsc.page_name_field = getattr(module, "page_name_field", "page_name")
|
||||
wsc.condition_field = getattr(module, "condition_field", None)
|
||||
|
||||
|
||||
if webnotes.conn.exists("Website Sitemap Config", wsc.link_name):
|
||||
# found by earlier app, override
|
||||
webnotes.delete_doc("Website Sitemap Config", wsc.link_name)
|
||||
|
||||
webnotes.bean(wsc).insert()
|
||||
|
||||
return name
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue