您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

182 行
6.0 KiB

  1. from __future__ import unicode_literals
  2. from . import __version__ as app_version
  3. app_name = "frappe"
  4. app_title = "Frappe Framework"
  5. app_publisher = "Frappe Technologies"
  6. app_description = "Full stack web framework with Python, Javascript, MariaDB, Redis, Node"
  7. app_icon = "octicon octicon-circuit-board"
  8. app_color = "orange"
  9. source_link = "https://github.com/frappe/frappe"
  10. app_license = "MIT"
  11. app_email = "info@frappe.io"
  12. before_install = "frappe.utils.install.before_install"
  13. after_install = "frappe.utils.install.after_install"
  14. page_js = {
  15. "setup-wizard": "public/js/frappe/setup_wizard.js"
  16. }
  17. # website
  18. app_include_js = [
  19. "assets/js/libs.min.js",
  20. "assets/js/desk.min.js",
  21. "assets/js/list.min.js",
  22. "assets/js/form.min.js",
  23. "assets/js/report.min.js",
  24. "assets/js/d3.min.js",
  25. "assets/frappe/js/frappe/toolbar.js"
  26. ]
  27. app_include_css = [
  28. "assets/css/desk.min.css",
  29. "assets/css/list.min.css",
  30. "assets/css/form.min.css",
  31. "assets/css/report.min.css",
  32. "assets/css/module.min.css"
  33. ]
  34. web_include_js = [
  35. "website_script.js"
  36. ]
  37. bootstrap = "assets/frappe/css/bootstrap.css"
  38. web_include_css = [
  39. "assets/css/frappe-web.css"
  40. ]
  41. website_route_rules = [
  42. {"from_route": "/blog/<category>", "to_route": "Blog Post"},
  43. {"from_route": "/kb/<category>", "to_route": "Help Article"}
  44. ]
  45. write_file_keys = ["file_url", "file_name"]
  46. notification_config = "frappe.core.notifications.get_notification_config"
  47. before_tests = "frappe.utils.install.before_tests"
  48. email_append_to = ["Event", "ToDo", "Communication"]
  49. calendars = ["Event"]
  50. # login
  51. on_session_creation = [
  52. "frappe.core.doctype.communication.feed.login_feed",
  53. "frappe.core.doctype.user.user.notify_admin_access_to_system_manager",
  54. "frappe.limits.check_if_expired",
  55. "frappe.utils.scheduler.reset_enabled_scheduler_events",
  56. ]
  57. # permissions
  58. permission_query_conditions = {
  59. "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions",
  60. "ToDo": "frappe.desk.doctype.todo.todo.get_permission_query_conditions",
  61. "User": "frappe.core.doctype.user.user.get_permission_query_conditions",
  62. "Note": "frappe.desk.doctype.note.note.get_permission_query_conditions",
  63. "Contact": "frappe.geo.address_and_contact.get_permission_query_conditions_for_contact",
  64. "Address": "frappe.geo.address_and_contact.get_permission_query_conditions_for_address"
  65. }
  66. has_permission = {
  67. "Event": "frappe.desk.doctype.event.event.has_permission",
  68. "ToDo": "frappe.desk.doctype.todo.todo.has_permission",
  69. "User": "frappe.core.doctype.user.user.has_permission",
  70. "Note": "frappe.desk.doctype.note.note.has_permission",
  71. "Contact": "frappe.geo.address_and_contact.has_permission",
  72. "Address": "frappe.geo.address_and_contact.has_permission",
  73. "Communication": "frappe.core.doctype.communication.communication.has_permission",
  74. }
  75. has_website_permission = {
  76. "Address": "erpnext.utilities.doctype.address.address.has_website_permission"
  77. }
  78. standard_queries = {
  79. "User": "frappe.core.doctype.user.user.user_query"
  80. }
  81. doc_events = {
  82. "*": {
  83. "on_update": [
  84. "frappe.desk.notifications.clear_doctype_notifications",
  85. "frappe.core.doctype.communication.feed.update_feed"
  86. ],
  87. "after_rename": "frappe.desk.notifications.clear_doctype_notifications",
  88. "on_cancel": [
  89. "frappe.desk.notifications.clear_doctype_notifications",
  90. ],
  91. "on_trash": "frappe.desk.notifications.clear_doctype_notifications",
  92. "on_change": "frappe.core.doctype.feedback_trigger.feedback_trigger.trigger_feedback_request"
  93. },
  94. "Email Group Member": {
  95. "validate": "frappe.email.doctype.email_group.email_group.restrict_email_group"
  96. },
  97. }
  98. scheduler_events = {
  99. "all": [
  100. "frappe.email.queue.flush",
  101. "frappe.email.doctype.email_account.email_account.pull",
  102. "frappe.email.doctype.email_account.email_account.notify_unreplied",
  103. "frappe.oauth.delete_oauth2_data"
  104. ],
  105. "hourly": [
  106. "frappe.model.utils.link_count.update_link_count",
  107. 'frappe.model.utils.list_settings.sync_list_settings',
  108. "frappe.utils.error.collect_error_snapshots"
  109. ],
  110. "daily": [
  111. "frappe.email.queue.clear_outbox",
  112. "frappe.desk.notifications.clear_notifications",
  113. "frappe.core.doctype.error_log.error_log.set_old_logs_as_seen",
  114. "frappe.desk.doctype.event.event.send_event_digest",
  115. "frappe.sessions.clear_expired_sessions",
  116. "frappe.email.doctype.email_alert.email_alert.trigger_daily_alerts",
  117. "frappe.async.remove_old_task_logs",
  118. "frappe.utils.scheduler.disable_scheduler_on_expiry",
  119. "frappe.utils.scheduler.restrict_scheduler_events_if_dormant",
  120. "frappe.limits.update_space_usage",
  121. "frappe.email.doctype.auto_email_report.auto_email_report.send_daily",
  122. "frappe.desk.page.backups.backups.delete_downloadable_backups",
  123. "frappe.core.doctype.feedback_request.feedback_request.delete_feedback_request",
  124. "frappe.core.doctype.authentication_log.authentication_log.clear_authentication_logs"
  125. ],
  126. "monthly": [
  127. "frappe.email.doctype.auto_email_report.auto_email_report.send_monthly"
  128. ]
  129. }
  130. get_translated_dict = {
  131. ("doctype", "System Settings"): "frappe.geo.country_info.get_translated_dict",
  132. ("page", "setup-wizard"): "frappe.geo.country_info.get_translated_dict"
  133. }
  134. sounds = [
  135. {"name": "email", "src": "/assets/frappe/sounds/email.mp3", "volume": 0.1},
  136. {"name": "submit", "src": "/assets/frappe/sounds/submit.mp3", "volume": 0.1},
  137. {"name": "cancel", "src": "/assets/frappe/sounds/cancel.mp3", "volume": 0.1},
  138. {"name": "delete", "src": "/assets/frappe/sounds/delete.mp3", "volume": 0.05},
  139. {"name": "click", "src": "/assets/frappe/sounds/click.mp3", "volume": 0.05},
  140. {"name": "error", "src": "/assets/frappe/sounds/error.mp3", "volume": 0.1},
  141. # {"name": "alert", "src": "/assets/frappe/sounds/alert.mp3"},
  142. # {"name": "chime", "src": "/assets/frappe/sounds/chime.mp3"},
  143. ]
  144. bot_parsers = [
  145. 'frappe.utils.bot.ShowNotificationBot',
  146. 'frappe.utils.bot.GetOpenListBot',
  147. 'frappe.utils.bot.ListBot',
  148. 'frappe.utils.bot.FindBot',
  149. 'frappe.utils.bot.CountBot'
  150. ]
  151. setup_wizard_exception = "frappe.desk.page.setup_wizard.setup_wizard.email_setup_wizard_exception"
  152. before_write_file = "frappe.limits.validate_space_limit"
  153. integration_services = ["PayPal", "Razorpay", "Dropbox", "LDAP"]