Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

187 строки
5.9 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/editor.min.js",
  22. "assets/js/list.min.js",
  23. "assets/js/form.min.js",
  24. "assets/js/report.min.js",
  25. "assets/js/d3.min.js",
  26. "assets/frappe/js/frappe/toolbar.js"
  27. ]
  28. app_include_css = [
  29. "assets/css/desk.min.css",
  30. "assets/css/list.min.css",
  31. "assets/css/form.min.css",
  32. "assets/css/report.min.css",
  33. "assets/css/module.min.css"
  34. ]
  35. web_include_js = [
  36. "website_script.js"
  37. ]
  38. bootstrap = "assets/frappe/css/bootstrap.css"
  39. web_include_css = [
  40. "assets/css/frappe-web.css"
  41. ]
  42. website_route_rules = [
  43. {"from_route": "/blog", "to_route": "Blog Post"},
  44. {"from_route": "/blog/<category>", "to_route": "Blog Post"}
  45. ]
  46. write_file_keys = ["file_url", "file_name"]
  47. notification_config = "frappe.core.notifications.get_notification_config"
  48. before_tests = "frappe.utils.install.before_tests"
  49. website_generators = ["Web Page", "Blog Post", "Blog Category", "Web Form"]
  50. email_append_to = ["Event", "ToDo", "Communication"]
  51. calendars = ["Event"]
  52. # login
  53. on_session_creation = [
  54. "frappe.core.doctype.communication.feed.login_feed",
  55. "frappe.core.doctype.user.user.notifify_admin_access_to_system_manager",
  56. "frappe.limits.check_if_expired",
  57. "frappe.utils.scheduler.reset_enabled_scheduler_events",
  58. ]
  59. # permissions
  60. permission_query_conditions = {
  61. "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions",
  62. "ToDo": "frappe.desk.doctype.todo.todo.get_permission_query_conditions",
  63. "User": "frappe.core.doctype.user.user.get_permission_query_conditions",
  64. "Note": "frappe.desk.doctype.note.note.get_permission_query_conditions",
  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. "Communication": "frappe.core.doctype.communication.communication.has_permission"
  72. }
  73. standard_queries = {
  74. "User": "frappe.core.doctype.user.user.user_query"
  75. }
  76. doc_events = {
  77. "*": {
  78. "after_insert": "frappe.email.doctype.email_alert.email_alert.trigger_email_alerts",
  79. "validate": [
  80. "frappe.email.doctype.email_alert.email_alert.trigger_email_alerts",
  81. ],
  82. "on_update": [
  83. "frappe.desk.notifications.clear_doctype_notifications",
  84. "frappe.email.doctype.email_alert.email_alert.trigger_email_alerts",
  85. "frappe.core.doctype.communication.feed.update_feed"
  86. ],
  87. "after_rename": "frappe.desk.notifications.clear_doctype_notifications",
  88. "on_submit": [
  89. "frappe.email.doctype.email_alert.email_alert.trigger_email_alerts",
  90. ],
  91. "on_cancel": [
  92. "frappe.desk.notifications.clear_doctype_notifications",
  93. "frappe.email.doctype.email_alert.email_alert.trigger_email_alerts"
  94. ],
  95. "on_trash": "frappe.desk.notifications.clear_doctype_notifications"
  96. },
  97. "Email Group Member": {
  98. "validate": "frappe.email.doctype.email_group.email_group.restrict_email_group"
  99. },
  100. }
  101. scheduler_events = {
  102. "all": [
  103. "frappe.email.queue.flush",
  104. "frappe.email.doctype.email_account.email_account.pull",
  105. "frappe.email.doctype.email_account.email_account.notify_unreplied",
  106. ],
  107. "hourly": [
  108. "frappe.model.utils.link_count.update_link_count",
  109. 'frappe.model.utils.list_settings.sync_list_settings',
  110. "frappe.utils.error.collect_error_snapshots"
  111. ],
  112. "daily": [
  113. "frappe.email.queue.clear_outbox",
  114. "frappe.desk.notifications.clear_notifications",
  115. "frappe.core.doctype.scheduler_log.scheduler_log.set_old_logs_as_seen",
  116. "frappe.desk.doctype.event.event.send_event_digest",
  117. "frappe.sessions.clear_expired_sessions",
  118. "frappe.email.doctype.email_alert.email_alert.trigger_daily_alerts",
  119. "frappe.async.remove_old_task_logs",
  120. "frappe.utils.scheduler.disable_scheduler_on_expiry",
  121. "frappe.utils.scheduler.restrict_scheduler_events_if_dormant",
  122. "frappe.limits.update_space_usage",
  123. "frappe.email.doctype.auto_email_report.auto_email_report.send_daily"
  124. ],
  125. "daily_long": [
  126. "frappe.integrations.doctype.dropbox_backup.dropbox_backup.take_backups_daily"
  127. ],
  128. "weekly_long": [
  129. "frappe.integrations.doctype.dropbox_backup.dropbox_backup.take_backups_weekly"
  130. ],
  131. "monthly": [
  132. "frappe.email.doctype.auto_email_report.auto_email_report.send_monthly"
  133. ]
  134. }
  135. default_background = "/assets/frappe/images/ui/into-the-dawn.jpg"
  136. get_translated_dict = {
  137. ("doctype", "System Settings"): "frappe.geo.country_info.get_translated_dict",
  138. ("page", "setup-wizard"): "frappe.geo.country_info.get_translated_dict"
  139. }
  140. sounds = [
  141. {"name": "email", "src": "/assets/frappe/sounds/email.mp3", "volume": 0.1},
  142. {"name": "submit", "src": "/assets/frappe/sounds/submit.mp3", "volume": 0.1},
  143. {"name": "cancel", "src": "/assets/frappe/sounds/cancel.mp3", "volume": 0.1},
  144. {"name": "delete", "src": "/assets/frappe/sounds/delete.mp3", "volume": 0.05},
  145. {"name": "click", "src": "/assets/frappe/sounds/click.mp3", "volume": 0.05},
  146. {"name": "error", "src": "/assets/frappe/sounds/error.mp3", "volume": 0.1},
  147. # {"name": "alert", "src": "/assets/frappe/sounds/alert.mp3"},
  148. # {"name": "chime", "src": "/assets/frappe/sounds/chime.mp3"},
  149. ]
  150. bot_parsers = [
  151. 'frappe.utils.bot.ShowNotificationBot',
  152. 'frappe.utils.bot.GetOpenListBot',
  153. 'frappe.utils.bot.ListBot',
  154. 'frappe.utils.bot.FindBot',
  155. 'frappe.utils.bot.CountBot'
  156. ]
  157. setup_wizard_exception = "frappe.desk.page.setup_wizard.setup_wizard.email_setup_wizard_exception"
  158. before_write_file = "frappe.limits.validate_space_limit"