Personal wiki notebook (not under development)
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.

Common.py 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. import cherrypy
  2. from controller.Session_storage import Session_storage
  3. MEGABYTE = 1024 * 1024
  4. settings = {
  5. "global": {
  6. "server.socket_port": 8081,
  7. "server.environment": "production",
  8. "session_filter.on": True,
  9. "session_filter.storage_class": Session_storage,
  10. "session_filter.timeout": 60 * 72, # 72 hours
  11. "session_filter.clean_up_delay": 5,
  12. "encoding_filter.on": True,
  13. "encoding_filter.encoding": "utf-8",
  14. "decoding_filter.on": True,
  15. "decoding_filter.encoding": "utf-8",
  16. "luminotes.http_url": "",
  17. "luminotes.https_url": "",
  18. "luminotes.http_proxy_ip": "127.0.0.1",
  19. "luminotes.https_proxy_ip": "127.0.0.2",
  20. "luminotes.db_host": "localhost", # hostname for PostgreSQL or None (no quotes) for SQLite
  21. "luminotes.db_ssl_mode": "allow", # "disallow", "allow", "prefer", or "require"
  22. "luminotes.web_server": "", # "", "apache", or "nginx" to use specific server support (optional)
  23. "luminotes.support_email": "",
  24. "luminotes.payment_email": "",
  25. "luminotes.rate_plans": [
  26. {
  27. "name": "free",
  28. "designed_for": "",
  29. "storage_quota_bytes": 30 * MEGABYTE,
  30. "included_users": 1,
  31. "notebook_sharing": True,
  32. "notebook_collaboration": True,
  33. "user_admin": False,
  34. "fee": None,
  35. "yearly_fee": None,
  36. },
  37. {
  38. "name": "basic",
  39. "designed_for": "home users",
  40. "storage_quota_bytes": 250 * MEGABYTE,
  41. "included_users": 1,
  42. "notebook_sharing": True,
  43. "notebook_collaboration": True,
  44. "user_admin": False,
  45. "fee": 5,
  46. "yearly_fee": 50,
  47. "button":
  48. """
  49. """,
  50. "yearly_button":
  51. """
  52. """,
  53. },
  54. {
  55. "name": "standard",
  56. "designed_for": "professionals",
  57. "storage_quota_bytes": 500 * MEGABYTE,
  58. "included_users": 1,
  59. "notebook_sharing": True,
  60. "notebook_collaboration": True,
  61. "user_admin": False,
  62. "fee": 9,
  63. "yearly_fee": 90,
  64. "button":
  65. """
  66. """,
  67. "yearly_button":
  68. """
  69. """,
  70. },
  71. {
  72. "name": "plus",
  73. "designed_for": "small teams",
  74. "storage_quota_bytes": 1000 * MEGABYTE,
  75. "included_users": 5,
  76. "notebook_sharing": True,
  77. "notebook_collaboration": True,
  78. "user_admin": True,
  79. "fee": 19,
  80. "yearly_fee": 190,
  81. "button":
  82. """
  83. """,
  84. "yearly_button":
  85. """
  86. """,
  87. },
  88. {
  89. "name": "premium",
  90. "designed_for": "organizations",
  91. "storage_quota_bytes": 5000 * MEGABYTE,
  92. "included_users": 30,
  93. "notebook_sharing": True,
  94. "notebook_collaboration": True,
  95. "user_admin": True,
  96. "fee": 99,
  97. "yearly_fee": 990,
  98. "button":
  99. """
  100. """,
  101. "yearly_button":
  102. """
  103. """,
  104. },
  105. ],
  106. "luminotes.download_products": [
  107. {
  108. "name": "Luminotes Desktop",
  109. "designed_for": "individuals",
  110. "storage_quota_bytes": None,
  111. "included_users": 1,
  112. "notebook_sharing": False,
  113. "notebook_collaboration": False,
  114. "user_admin": False,
  115. "fee": "20.00",
  116. "item_number": "5000",
  117. "filename": "luminotes.exe",
  118. "button":
  119. """
  120. """,
  121. },
  122. ],
  123. "luminotes.unsubscribe_button":
  124. """
  125. """,
  126. },
  127. "/files/download": {
  128. "stream_response": True,
  129. "encoding_filter.on": False,
  130. },
  131. "/files/download_product": {
  132. "stream_response": True,
  133. "encoding_filter.on": False,
  134. },
  135. "/files/thumbnail": {
  136. "encoding_filter.on": False,
  137. },
  138. "/files/image": {
  139. "stream_response": True,
  140. "encoding_filter.on": False,
  141. },
  142. "/notebooks/export": {
  143. "stream_response": True,
  144. "encoding_filter.on": False,
  145. },
  146. "/files/upload": {
  147. "server.max_request_body_size": 505 * MEGABYTE, # maximum upload size
  148. },
  149. "/files/progress": {
  150. "stream_response": True
  151. },
  152. }