forked from retoor/devplacepy
feat: add reactions, bookmarks, polls modules with session remember config
Add three new feature modules (reactions, bookmarks, polls) with corresponding database tables, indexes, and router registrations. Introduce `SESSION_MAX_AGE_REMEMBER` config for extended session duration, add `get_unread_messages` template global, and include operational defaults for rate limiting and session settings in `site_settings`.
This commit is contained in:
@@ -133,6 +133,13 @@ def app_server(test_db_path):
|
||||
f"Server did not start after 30s. "
|
||||
f"Log:\n{server_log()}"
|
||||
)
|
||||
|
||||
from devplacepy.database import get_table as _get_table
|
||||
ops_settings = _get_table("site_settings")
|
||||
for key, value in (("rate_limit_per_minute", "1000000"), ("rate_limit_window_seconds", "60")):
|
||||
if not ops_settings.find_one(key=key):
|
||||
ops_settings.insert({"uid": f"test_{key}", "key": key, "value": value})
|
||||
|
||||
yield proc
|
||||
try:
|
||||
proc.terminate()
|
||||
|
||||
Reference in New Issue
Block a user