Debian Codegraph @

pecan/scaffolds/base/config.py_tmpl

raw
1 # Server Specific Configurations
2 server = {
3 'port': '8080',
4 'host': '0.0.0.0'
5 }
6
7 # Pecan Application Configurations
8 app = {
9 'root': '${package}.controllers.root.RootController',
10 'modules': ['${package}'],
11 'static_root': '%(confdir)s/public',
12 'template_path': '%(confdir)s/${package}/templates',
13 'debug': True,
14 'errors': {
15 404: '/error/404',
16 '__force_dict__': True
17 }
18 }
19
20 logging = {
21 'root': {'level': 'INFO', 'handlers': ['console']},
22 'loggers': {
23 '${package}': {'level': 'DEBUG', 'handlers': ['console'], 'propagate': False},
24 'pecan': {'level': 'DEBUG', 'handlers': ['console'], 'propagate': False},
25 'py.warnings': {'handlers': ['console']},
26 '__force_dict__': True
27 },
28 'handlers': {
29 'console': {
30 'level': 'DEBUG',
31 'class': 'logging.StreamHandler',
32 'formatter': 'color'
33 }
34 },
35 'formatters': {
36 'simple': {
37 'format': ('%(asctime)s %(levelname)-5.5s [%(name)s]'
38 '[%(threadName)s] %(message)s')
39 },
40 'color': {
41 '()': 'pecan.log.ColorFormatter',
42 'format': ('%(asctime)s [%(padded_color_levelname)s] [%(name)s]'
43 '[%(threadName)s] %(message)s'),
44 '__force_dict__': True
45 }
46 }
47 }
48
49 # Custom Configurations must be in Python dictionary format::
50 #
51 # foo = {'bar':'baz'}
52 #
53 # All configurations are accessible at::
54 # pecan.conf