Archived
1
0
This repository has been archived on 2023-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
luminotes/config/Common.py
Dan Helfman 4d736d4821 Lots of work on user storage quotas:
* Each model.User now has a current storage bytes and a rate plan.
 * model.User.to_dict() updated accordingly.
 * Minor Scheduler.add() change to bail of the given thread is None.
 * controller.Users.current() returns current user's rate plan details.
 * controller.Users.update_storage() now takes an optional callback.
 * Various methods in controller.Notebooks responsible for calling controller.Users.update_storage().
 * Added rate plan details to config/Common.py.
 * Added quota utilization colors to style.css.
 * Implemented quota utilization calculation and display in Wiki.js.

Still to-do: Return updated storage bytes where appropriate in controller.Notebook and update the
client accordingly.
2007-09-20 20:36:19 +00:00

42 lines
1.0 KiB
Python

import cherrypy
MEGABYTE = 1024 * 1024
settings = {
"global": {
"server.socket_port": 8081,
"server.environment": "production",
"session_filter.on": True,
"session_filter.storage_type": "file",
"session_filter.storage_path": "session",
"session_filter.timeout": 60 * 72, # 72 hours
"session_filter.clean_up_delay": 5,
"session_filter.locking": "implicit",
"encoding_filter.on": True,
"encoding_filter.encoding": "utf-8",
"decoding_filter.on": True,
"decoding_filter.encoding": "utf-8",
"luminotes.http_url": "",
"luminotes.https_url": "",
"luminotes.http_proxy_ip": "127.0.0.1",
"luminotes.https_proxy_ip": "127.0.0.2",
"luminotes.support_email": "support@luminotes.com",
"luminotes.rate_plans": [
{
"name": "basic",
"storage_quota_bytes": 30 * MEGABYTE,
},
{
"name": "standard",
"storage_quota_bytes": 100 * MEGABYTE,
},
{
"name": "professional",
"storage_quota_bytes": 300 * MEGABYTE,
},
],
},
}