index acaa13c8b785062b57690df663cb05b84ac70b84..0cc4a38af39abf37d96675c7b351d4528ecc3a99 100644 (file)
--- a/demo.py
+++ b/demo.py
template_dir = os.path.join('share', 'roundup', 'templates', template)
init.install(home, template_dir)
# don't have email flying around
- os.remove(os.path.join(home, 'detectors', 'nosyreaction.py'))
- try:
- os.remove(os.path.join(home, 'detectors', 'nosyreaction.pyc'))
- except os.error, error:
- if error.errno != errno.ENOENT:
- raise
+ nosyreaction = os.path.join(home, 'detectors', 'nosyreaction.py')
+ if os.path.exists(nosyreaction):
+ os.remove(nosyreaction)
+ nosyreaction += 'c'
+ if os.path.exists(nosyreaction):
+ os.remove(nosyreaction)
init.write_select_db(home, backend)
# figure basic params for server
# add the "demo" user
db = tracker.open('admin')
- db.user.create(username='demo', password=password.Password('demo'),
- realname='Demo User', roles='User')
+ # FIXME: Move tracker-specific demo initialization into the tracker templates.
+ if (template == 'minimal'):
+ db.user.create(username='demo', password=password.Password('demo'),
+ roles='User')
+ else:
+ db.user.create(username='demo', password=password.Password('demo'),
+ realname='Demo User', roles='User')
db.commit()
db.close()
run demo on a server host, please stop the demo, open file
"demo/config.ini" with your editor, change the host name in the "web"
option in section "[tracker]", save the file, then re-run the demo
-program.
+program. If you want to change backend types, you must use "nuke".
''' % url