Files
@ 2fcd8cb6dc62
Branch filter:
Location: rattail-project/rattail/rattail/data/config/rattail.conf
2fcd8cb6dc62
2.7 KiB
text/plain
Do not assign `AppHandler.enum` in constructor
the app handler is created before config extensions are applied, and
the latter may determine which enum module should be used. so
use a property to fetch on-demand instead of assigning it so early
the app handler is created before config extensions are applied, and
the latter may determine which enum module should be used. so
use a property to fetch on-demand instead of assigning it so early
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
############################################################
#
# generic Rattail config
#
############################################################
##############################
# rattail
##############################
[rattail]
timezone.default = America/Chicago
# TODO: you probably should change these to absolute path
datadir = app/data
batch.files = app/batch
workdir = app/work
[rattail.config]
# include = /etc/rattail/rattail.conf
configure_logging = true
usedb = true
preferdb = true
[rattail.db]
default.url = postgresql://rattail:rattailpass@localhost/rattail
# TODO: enable if you want data versioning
# versioning.enabled = true
[rattail.mail]
send_emails = false
smtp.server = localhost
templates = rattail:templates/mail
default.prefix = [Rattail]
default.from = rattail@localhost
default.to = root@localhost
# default.enabled = false
##############################
# alembic
##############################
[alembic]
# TODO: must set these for your app if you extend the DB schema
# script_location = poser.db:alembic
# version_locations = poser.db:alembic/versions rattail.db:alembic/versions
script_location = rattail.db:alembic
version_locations = rattail.db:alembic/versions
##############################
# logging
##############################
[loggers]
keys = root, exc_logger, beaker, txn, sqlalchemy, django_db, flufl_bounce, requests
[handlers]
keys = file, console, email
[formatters]
keys = generic, console
[logger_root]
handlers = file, console
level = DEBUG
[logger_exc_logger]
qualname = exc_logger
handlers = email
level = ERROR
[logger_beaker]
qualname = beaker
handlers =
level = INFO
[logger_txn]
qualname = txn
handlers =
level = INFO
[logger_sqlalchemy]
qualname = sqlalchemy.engine
handlers =
# handlers = file
# level = INFO
[logger_django_db]
qualname = django.db.backends
handlers =
level = INFO
# level = DEBUG
[logger_flufl_bounce]
qualname = flufl.bounce
handlers =
level = WARNING
[logger_requests]
qualname = requests
handlers =
# level = WARNING
[handler_file]
class = handlers.RotatingFileHandler
# TODO: you probably should change this to absolute path
args = ('app/log/rattail.log', 'a', 1000000, 100, 'utf_8')
formatter = generic
[handler_console]
class = StreamHandler
args = (sys.stderr,)
formatter = console
# formatter = generic
# level = INFO
# level = WARNING
[handler_email]
class = handlers.SMTPHandler
args = ('localhost', 'rattail@localhost', ['root@localhost'], "[Rattail] Logging")
formatter = generic
level = ERROR
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(funcName)s: %(message)s
datefmt = %Y-%m-%d %H:%M:%S
[formatter_console]
format = %(levelname)-5.5s [%(name)s][%(threadName)s] %(funcName)s: %(message)s
|