Files
dilib_operations/scripts/generate-secrets.py
T
ms 2c1c48df0c
PostgreSQL integration / tests (push) Has been cancelled
init
2026-11-09 13:15:48 +01:00

7 lines
346 B
Python

import secrets,sys
from pathlib import Path
p=Path(sys.argv[1]);text=p.read_text()
text=text.replace('DJANGO_SECRET_KEY=CHANGE_ME_GENERATE_WITH_SECRETS','DJANGO_SECRET_KEY='+secrets.token_urlsafe(64))
text=text.replace('NICEGUI_STORAGE_SECRET=CHANGE_ME_GENERATE_SEPARATELY','NICEGUI_STORAGE_SECRET='+secrets.token_urlsafe(64))
p.write_text(text)