aboutsummaryrefslogtreecommitdiff
blob: 249c2fdc9135918130f149d30808977313f84114 (plain)
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
# written 2007 by Robin H. Johnson <robbat2@gentoo.org>
# License: GPL-2

"""settings modules"""

class DatabaseConfig(object):
    # No touchy
    settings = {}

    # Uncomment exactly one of these lines!
    mode = 'mysql'
    #sqlite mode is broken for now
    #mode = 'sqlite'

    # SQLite is supported, but not recommended
    # It does not allow full privilege seperation,
    # and allows only a single thread to hit the database at a time.
    settings['sqlite'] = {}
    settings['sqlite'] ['database'] = '/CHANGE_ME/pgo.db'

    # Settings for MySQL. You need to create two users in 
    # your MySQL database.
    # The _ro user should ONLY have privileges to use 'SELECT' on the tables!
    # The _rw user needs:
    # CREATE TABLE, DROP TABLE, DELETE, INSERT, UPDATE, SELECT
    # Do NOT change these
    settings['mysql_ro'] = {}
    settings['mysql_ro']['charset'] = 'utf8'
    # These you should change
    settings['mysql_ro']['host'] = 'CHANGEME'
    settings['mysql_ro']['db'] = 'CHANGEME'
    settings['mysql_ro']['user'] = 'CHANGEME'
    settings['mysql_ro']['passwd'] = 'CHANGEME'
    settings['mysql_rw'] = settings['mysql_ro'].copy()
    settings['mysql_rw']['user'] = 'CHANGEME'
    settings['mysql_rw']['passwd'] = 'CHANGEME'
    
    # Disable memcache by default
    settings['memcached'] = None
    # Uncomment the next 3 lines if you want memcache support
    #settings['memcached'] = {}
    #settings['memcached']['servers'] = ['127.0.0.1:11211']
    #settings['memcached']['args'] = {'debug': False}

# vim:ts=4 et ft=python: