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.
 
 
 
 
 
 

174 regels
5.6 KiB

  1. from __future__ import unicode_literals
  2. app_name = "frappe"
  3. app_title = "Frappe Framework"
  4. app_publisher = "Frappe Technologies"
  5. app_description = "Full stack web framework with Python, Javascript, MariaDB, Redis, Node"
  6. app_icon = "octicon octicon-circuit-board"
  7. app_version = "6.27.21"
  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. # website
  15. app_include_js = [
  16. "assets/js/libs.min.js",
  17. "assets/js/desk.min.js",
  18. "assets/js/editor.min.js",
  19. "assets/js/list.min.js",
  20. "assets/js/form.min.js",
  21. "assets/js/report.min.js",
  22. "assets/js/d3.min.js"
  23. ]
  24. app_include_css = [
  25. "assets/css/desk.min.css",
  26. "assets/css/list.min.css",
  27. "assets/css/form.min.css",
  28. "assets/css/report.min.css",
  29. "assets/css/module.min.css"
  30. ]
  31. web_include_js = [
  32. "website_script.js"
  33. ]
  34. bootstrap = "assets/frappe/css/bootstrap.css"
  35. web_include_css = [
  36. "assets/frappe/css/font/open-sans/open-sans.css",
  37. "assets/css/frappe-web.css"
  38. ]
  39. website_route_rules = [
  40. {"from_route": "/blog", "to_route": "Blog Post"},
  41. {"from_route": "/blog/<category>", "to_route": "Blog Post"}
  42. ]
  43. write_file_keys = ["file_url", "file_name"]
  44. notification_config = "frappe.core.notifications.get_notification_config"
  45. before_tests = "frappe.utils.install.before_tests"
  46. website_generators = ["Web Page", "Blog Post", "Blog Category", "Web Form"]
  47. email_append_to = ["Event", "ToDo", "Communication"]
  48. calendars = ["Event"]
  49. # login
  50. on_session_creation = [
  51. "frappe.core.doctype.communication.feed.login_feed",
  52. "frappe.core.doctype.user.user.notifify_admin_access_to_system_manager",
  53. "frappe.limits.check_if_expired", #Unsure of where to move
  54. "frappe.utils.scheduler.reset_enabled_scheduler_events",
  55. ]
  56. # permissions
  57. permission_query_conditions = {
  58. "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions",
  59. "ToDo": "frappe.desk.doctype.todo.todo.get_permission_query_conditions",
  60. "User": "frappe.core.doctype.user.user.get_permission_query_conditions",
  61. "Note": "frappe.desk.doctype.note.note.get_permission_query_conditions",
  62. }
  63. has_permission = {
  64. "Event": "frappe.desk.doctype.event.event.has_permission",
  65. "ToDo": "frappe.desk.doctype.todo.todo.has_permission",
  66. "User": "frappe.core.doctype.user.user.has_permission",
  67. "Note": "frappe.desk.doctype.note.note.has_permission",
  68. "Communication": "frappe.core.doctype.communication.communication.has_permission"
  69. }
  70. standard_queries = {
  71. "User": "frappe.core.doctype.user.user.user_query"
  72. }
  73. doc_events = {
  74. "User": {
  75. "validate": "frappe.utils.user.validate_user_limit"
  76. },
  77. "*": {
  78. "after_insert": "frappe.email.doctype.email_alert.email_alert.trigger_email_alerts",
  79. "validate": "frappe.email.doctype.email_alert.email_alert.trigger_email_alerts",
  80. "on_update": [
  81. "frappe.desk.notifications.clear_doctype_notifications",
  82. "frappe.email.doctype.email_alert.email_alert.trigger_email_alerts",
  83. "frappe.core.doctype.communication.feed.update_feed"
  84. ],
  85. "after_rename": "frappe.desk.notifications.clear_doctype_notifications",
  86. "on_submit": [
  87. "frappe.email.doctype.email_alert.email_alert.trigger_email_alerts",
  88. ],
  89. "on_cancel": [
  90. "frappe.desk.notifications.clear_doctype_notifications",
  91. "frappe.email.doctype.email_alert.email_alert.trigger_email_alerts"
  92. ],
  93. "on_trash": "frappe.desk.notifications.clear_doctype_notifications"
  94. }
  95. }
  96. scheduler_events = {
  97. "all": [
  98. "frappe.email.bulk.flush",
  99. "frappe.email.doctype.email_account.email_account.pull",
  100. "frappe.email.doctype.email_account.email_account.notify_unreplied",
  101. "frappe.utils.error.collect_error_snapshots",
  102. "frappe.model.utils.link_count.update_link_count",
  103. 'frappe.model.utils.list_settings.sync_list_settings'
  104. ],
  105. "daily": [
  106. "frappe.email.bulk.clear_outbox",
  107. "frappe.desk.notifications.clear_notifications",
  108. "frappe.core.doctype.scheduler_log.scheduler_log.set_old_logs_as_seen",
  109. "frappe.desk.doctype.event.event.send_event_digest",
  110. "frappe.sessions.clear_expired_sessions",
  111. "frappe.email.doctype.email_alert.email_alert.trigger_daily_alerts",
  112. "frappe.async.remove_old_task_logs",
  113. "frappe.utils.scheduler.disable_scheduler_on_expiry",
  114. "frappe.utils.scheduler.restrict_scheduler_events_if_dormant",
  115. "frappe.core.doctype.file.file.update_sizes"
  116. ],
  117. "daily_long": [
  118. "frappe.integrations.doctype.dropbox_backup.dropbox_backup.take_backups_daily"
  119. ],
  120. "weekly_long": [
  121. "frappe.integrations.doctype.dropbox_backup.dropbox_backup.take_backups_weekly"
  122. ]
  123. }
  124. default_background = "/assets/frappe/images/ui/into-the-dawn.jpg"
  125. get_translated_dict = {
  126. ("doctype", "System Settings"): "frappe.geo.country_info.get_translated_dict",
  127. ("page", "setup-wizard"): "frappe.geo.country_info.get_translated_dict"
  128. }
  129. sounds = [
  130. {"name": "email", "src": "/assets/frappe/sounds/email.mp3", "volume": 0.1},
  131. {"name": "submit", "src": "/assets/frappe/sounds/submit.mp3", "volume": 0.1},
  132. {"name": "cancel", "src": "/assets/frappe/sounds/cancel.mp3", "volume": 0.1},
  133. {"name": "delete", "src": "/assets/frappe/sounds/delete.mp3", "volume": 0.05},
  134. {"name": "click", "src": "/assets/frappe/sounds/click.mp3", "volume": 0.05},
  135. {"name": "error", "src": "/assets/frappe/sounds/error.mp3", "volume": 0.1},
  136. # {"name": "alert", "src": "/assets/frappe/sounds/alert.mp3"},
  137. # {"name": "chime", "src": "/assets/frappe/sounds/chime.mp3"},
  138. ]
  139. bot_parsers = [
  140. 'frappe.utils.bot.ShowNotificationBot',
  141. 'frappe.utils.bot.GetOpenListBot',
  142. 'frappe.utils.bot.ListBot',
  143. 'frappe.utils.bot.FindBot',
  144. 'frappe.utils.bot.CountBot'
  145. ]
  146. before_write_file = "frappe.core.doctype.file.file.validate_space_limit"