Mercurial > p > roundup > code
comparison demo.py @ 2633:a9e1fff1e793
I thought I committed this last night. Ho hum.
- This implements most of the rest of the new tracker config layout:
- dbinit.py split between schema.py and initial_data.py
- interfaces.py gone
- tracker and detectors __init__.py gone
- Added some missing functionality to backends: db_exists test and db_nuke.
- Implemented configuration file options in postgresql backend.
- Cleaned up tracker initialisation a lot.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 27 Jul 2004 00:57:19 +0000 |
| parents | 31cb1014300c |
| children | 11811b313459 |
comparison
equal
deleted
inserted
replaced
| 2632:9c55f2bc5961 | 2633:a9e1fff1e793 |
|---|---|
| 1 #! /usr/bin/env python | 1 #! /usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2003 Richard Jones (richard@mechanicalcat.net) | 3 # Copyright (c) 2003 Richard Jones (richard@mechanicalcat.net) |
| 4 # | 4 # |
| 5 # $Id: demo.py,v 1.11 2004-05-28 01:09:10 richard Exp $ | 5 # $Id: demo.py,v 1.12 2004-07-27 00:57:17 richard Exp $ |
| 6 | 6 |
| 7 import sys, os, string, re, urlparse | 7 import sys, os, string, re, urlparse |
| 8 import shutil, socket, errno, BaseHTTPServer | 8 import shutil, socket, errno, BaseHTTPServer |
| 9 from glob import glob | 9 from glob import glob |
| 10 | 10 |
| 25 DATABASE = 'home' | 25 DATABASE = 'home' |
| 26 if module.db_exists(config): | 26 if module.db_exists(config): |
| 27 module.db_nuke(config) | 27 module.db_nuke(config) |
| 28 elif backend == 'postgresql': | 28 elif backend == 'postgresql': |
| 29 class config: | 29 class config: |
| 30 POSTGRESQL_DATABASE = {'database': 'rounduptest'} | 30 POSTGRESQL_DATABASE = 'rounduptest' |
| 31 DATABASE = 'home' | 31 DATABASE = 'home' |
| 32 if module.db_exists(config): | 32 if module.db_exists(config): |
| 33 module.db_nuke(config) | 33 module.db_nuke(config) |
| 34 | 34 |
| 35 init.install(home, os.path.join('templates', 'classic')) | 35 init.install(home, os.path.join('templates', 'classic')) |
