~canonical-ca-hackers/ubuntu-recommender/trunk

« back to all changes in this revision

Viewing changes to src/recommender/schema.py

  • Committer: Tarmac
  • Author(s): Michael Nelson
  • Date: 2012-03-09 21:04:53 UTC
  • mfrom: (50.1.8 944075-python-oops-wsgi)
  • Revision ID: tarmac@199959-20120309210453-xzh8yj3pfhvtfy8t
[r=james-w],[bug=944075] Adds schema config options for for oops_wsgi integration and tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
import django
28
28
from configglue import schema
29
29
from django_configglue.schema import schemas
 
30
from oops_dictconfig.configglue_options import OopsOption
30
31
 
31
32
DjangoSchema = schemas.get(django.get_version())
32
33
 
93
94
 
94
95
    class logging(schema.Section):
95
96
        webapp_logging_config = schema.StringOption(fatal=True)
 
97
 
 
98
    class piston(schema.Section):
 
99
        piston_display_errors = schema.BoolOption(default=False)
 
100
        piston_email_errors = schema.BoolOption(default=False)
 
101
 
 
102
    class oops_wsgi(schema.Section):
 
103
        oopses = OopsOption(default={
 
104
            'publishers': [{
 
105
                'type': 'datedir',
 
106
                'error_dir': 'oopses',
 
107
                'instance_id': 'dev',
 
108
                }],
 
109
            })