Add file for local site config options

This commit is contained in:
Jason Rhinelander 2021-01-04 13:54:59 -04:00
parent 443b2d21cf
commit 77f0eec3e9
4 changed files with 19 additions and 1 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ testnet.sock
devnet.sock
pylokimq.cpython-*.so
__pycache__
local_config.py

View File

@ -1,7 +1,15 @@
# Default configuration options for block observer.
#
# To override settings add `config.whatever = ...` into `local_config.py`; adding settings *here*
# will often cause git conflicts.
#
# To override things that are specific to mainnet/testnet/etc. add `config.whatever = ...` lines
# into `mainnet.py`/`testnet.py`/etc.
# LMQ RPC endpoint of lokid; can be a unix socket 'ipc:///path/to/lokid.sock' (preferred) or a tcp
# socket 'tcp://127.0.0.1:5678'. Typically you want this running with admin permission.
# This is actually set for each observer in the ...net.py script.
# Leave this as None here, and set it for each observer in the mainnet.py/testnet.py/etc. script.
lokid_rpc = None
# Default blocks per page for the index.

8
local_config.py Normal file
View File

@ -0,0 +1,8 @@
from observer import config
# Local settings. Changes to this file are meant for a local installation (and should not be
# committed to git).
# Example config override:
#config.blocks_per_page = 10

View File

@ -17,6 +17,7 @@ from pygments.formatters import HtmlFormatter
import subprocess
import config
import local_config
from lmq import FutureJSON, lmq_connection
# Make a dict of config.* to pass to templating