File: config.py

package info (click to toggle)
python-falcon 4.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,172 kB
  • sloc: python: 33,608; javascript: 92; sh: 50; makefile: 50
file content (41 lines) | stat: -rw-r--r-- 1,043 bytes parent folder | download | duplicates (3)
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
# Server Specific Configurations
server = {'port': '8080', 'host': '0.0.0.0'}

# Pecan Application Configurations
app = {
    'root': 'nuts.controllers.root.RootController',
    'modules': ['nuts'],
    'static_root': '%(confdir)s/public',
    'template_path': '%(confdir)s/nuts/templates',
    'debug': False,
    'errors': {404: '/error/404', '__force_dict__': True},
}

logging = {
    'loggers': {
        'root': {'level': 'INFO', 'handlers': ['console']},
        'nuts': {'level': 'DEBUG', 'handlers': ['console']},
    },
    'handlers': {
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
            'formatter': 'simple',
        }
    },
    'formatters': {
        'simple': {
            'format': (
                '%(asctime)s %(levelname)-5.5s [%(name)s]'
                '[%(threadName)s] %(message)s'
            )
        }
    },
}

# Custom Configurations must be in Python dictionary format::
#
# foo = {'bar':'baz'}
#
# All configurations are accessible at::
# pecan.conf