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.
wownero-funding-system/settings.py_example

101 lines
2.9 KiB

import logging
import socket
import collections
import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
SECRET = ''
DEBUG = True
COIN_ADDRESS_LENGTH = [97, 108]
COINCODE = ''
PSQL_HOST = "127.0.0.1:5432"
PSQL_DB = ''
PSQL_USER = 'postgres'
PSQL_PASS = ''
OPENID_ENABLED = False
OPENID_REALM = "master"
OPENID_URL = f"https://login.wownero.com/auth/realms/{OPENID_REALM}/protocol/openid-connect"
OPENID_CLIENT_ID = ""
OPENID_CLIENT_SECRET = ""
OPENID_REDIRECT_URI = "http://0.0.0.0:5004/wow-auth/"
SQLALCHEMY_DATABASE_URI = os.environ.get('SQLALCHEMY_DATABASE_URI', 'postgresql://{user}:{pw}@localhost/{db}').format(user=PSQL_USER, pw=PSQL_PASS, db=PSQL_DB)
SESSION_COOKIE_NAME = os.environ.get('{coincode}_SESSION_COOKIE_NAME', '{coincode}_id').format(coincode=COINCODE.upper())
SESSION_PREFIX = os.environ.get('{coincode}_SESSION_PREFIX', 'session:').format(coincode=COINCODE.upper())
REDIS_HOST = os.environ.get('REDIS_HOST', '127.0.0.1')
REDIS_PORT = int(os.environ.get('REDIS_PORT', 6379))
REDIS_PASSWD = os.environ.get('REDIS_PASSWD', None)
REDIS_URI = "redis://"
if REDIS_PASSWD:
REDIS_URI += f":{REDIS_PASSWD}"
REDIS_URI += f"@{REDIS_HOST}:{REDIS_PORT}"
BIND_HOST = os.environ.get("BIND_HOST", "0.0.0.0")
if not BIND_HOST:
raise Exception("BIND_HOST missing")
BIND_PORT = os.environ.get("BIND_PORT", 5004)
if not BIND_PORT:
raise Exception("BIND_PORT missing")
HOSTNAME = os.environ.get("{coincode}_HOSTNAME", socket.gethostname()).format(coincode=COINCODE.upper())
# If using a local RPC, no need for --rpc-login credentials unless you're binding wallet-rpc to 0.0.0.0. If you are, you're bad.
# elif, remote wallet-rpc, enable --rpc-login and enter credentials below.
RPC_HOST = '127.0.0.1'
RPC_PORT = '11182'
RPC_LOCATION = "http://{host}:{rpc_port}/json_rpc".format(host=RPC_HOST, rpc_port=RPC_PORT)
RPC_USERNAME = ""
RPC_PASSWORD = ""
RPC_HOST_DEVFUND = '127.0.0.1'
RPC_PORT_DEVFUND = '45679'
RPC_LOCATION_DEVFUND = "http://{host}:{rpc_port}/json_rpc".format(host=RPC_HOST, rpc_port=RPC_PORT)
RPC_USERNAME_DEVFUND = None
RPC_PASSWORD_DEVFUND = None
FUNDING_CATEGORIES = [
'wallets',
'marketing',
'core',
'misc',
'design'
]
FUNDING_STATUSES = collections.OrderedDict()
FUNDING_STATUSES[0] = 'disabled'
FUNDING_STATUSES[1] = 'proposal'
FUNDING_STATUSES[2] = 'funding'
FUNDING_STATUSES[3] = 'wip'
FUNDING_STATUSES[4] = 'completed'
USER_REG_DISABLED = False
PROPOSAL_CONTENT_DEFAULT = """
#### Why?
What problem(s) are you trying to solve?
#### How much?
What is the total cost in {coincode}? List expenses per item. Total hours of work and per hour rate. What exchange rates are you using?
#### What?
Describe your idea in detail.
#### Milestones?
Break down tasks into different stages. Each stage should have the estimated number of days/weeks needed and cost per stage.
#### Outcomes?
What will be delivered? What goals will be reached?
#### Why you?
What skills and experience do you have?
""".strip().format(coincode=COINCODE.upper())