Skip to content

Commit aa8c5e1

Browse files
author
Richard Jones
committed
instance_config -> config, and other related cleanups
1 parent 1f47c18 commit aa8c5e1

File tree

9 files changed

+54
-787
lines changed

9 files changed

+54
-787
lines changed

roundup/admin.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
19-
# $Id: admin.py,v 1.23 2002-08-19 02:53:27 richard Exp $
19+
# $Id: admin.py,v 1.24 2002-09-09 23:55:18 richard Exp $
2020

2121
import sys, os, getpass, getopt, re, UserDict, shlex, shutil
2222
try:
@@ -301,15 +301,15 @@ def do_install(self, instance_home, args):
301301

302302
print _('''
303303
You should now edit the instance configuration file:
304-
%(instance_config_file)s
304+
%(config_file)s
305305
... at a minimum, you must set MAILHOST, MAIL_DOMAIN and ADMIN_EMAIL.
306306
307307
If you wish to modify the default schema, you should also edit the database
308308
initialisation file:
309309
%(database_config_file)s
310310
... see the documentation on customizing for more information.
311311
''')%{
312-
'instance_config_file': os.path.join(instance_home, 'instance_config.py'),
312+
'config_file': os.path.join(instance_home, 'config.py'),
313313
'database_config_file': os.path.join(instance_home, 'dbinit.py')
314314
}
315315
return 0
@@ -1146,6 +1146,9 @@ def main(self):
11461146

11471147
#
11481148
# $Log: not supported by cvs2svn $
1149+
# Revision 1.23 2002/08/19 02:53:27 richard
1150+
# full database export and import is done
1151+
#
11491152
# Revision 1.22 2002/08/16 04:26:42 richard
11501153
# moving towards full database export
11511154
#

roundup/cgi/client.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.24 2002-09-09 23:38:41 richard Exp $
1+
# $Id: client.py,v 1.25 2002-09-09 23:55:19 richard Exp $
22

33
__doc__ = """
44
WWW request handler (also used in the stand-alone server).
@@ -310,12 +310,13 @@ def serve_static_file(self, file):
310310
# we just want to serve up the file named
311311
mt = mimetypes.guess_type(str(file))[0]
312312
self.header({'Content-Type': mt})
313-
self.write(open(os.path.join(self.instance.TEMPLATES, file)).read())
313+
self.write(open(os.path.join(self.instance.config.TEMPLATES,
314+
file)).read())
314315

315316
def renderTemplate(self, name, extension, **kwargs):
316317
''' Return a PageTemplate for the named page
317318
'''
318-
pt = getTemplate(self.instance.TEMPLATES, name, extension)
319+
pt = getTemplate(self.instance.config.TEMPLATES, name, extension)
319320
# XXX handle PT rendering errors here more nicely
320321
try:
321322
# let the template render figure stuff out
@@ -563,7 +564,7 @@ def registerAction(self):
563564
cl = self.db.user
564565
try:
565566
props = parsePropsFromForm(self.db, cl, self.form)
566-
props['roles'] = self.instance.NEW_WEB_USER_ROLES
567+
props['roles'] = self.instance.config.NEW_WEB_USER_ROLES
567568
self.userid = cl.create(**props)
568569
self.db.commit()
569570
except ValueError, message:
@@ -1010,7 +1011,7 @@ def _handle_message(self):
10101011
# handle the messageid
10111012
# TODO: handle inreplyto
10121013
messageid = "<%s.%s.%s@%s>"%(time.time(), random.random(),
1013-
self.classname, self.instance.MAIL_DOMAIN)
1014+
self.classname, self.instance.config.MAIL_DOMAIN)
10141015

10151016
# now create the message, attaching the files
10161017
content = '\n'.join(m)

0 commit comments

Comments
 (0)