You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

applications.py 643 B

12345678910111213141516171819202122
  1. # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
  2. # MIT License. See license.txt
  3. from __future__ import unicode_literals
  4. import webnotes
  5. @webnotes.whitelist()
  6. def get_app_list():
  7. out = {}
  8. installed = webnotes.get_installed_apps()
  9. for app in webnotes.get_all_apps(True):
  10. out[app] = {}
  11. app_hooks = webnotes.get_hooks(app_name=app)
  12. for key in ("app_name", "app_title", "app_description", "app_icon",
  13. "app_publisher", "app_version", "app_url", "app_color"):
  14. val = app_hooks.get(key) or []
  15. out[app][key] = val[0] if len(val) else ""
  16. if app in installed:
  17. out[app]["installed"] = 1
  18. return out