move conf file into the right directory in cvs, update Config.py to look

in the right place (will have to change to /etc/lampadas.conf later)
also some additions to the documentation
This commit is contained in:
david 2002-05-17 23:22:01 +00:00
parent 82c28ed2a9
commit bad4eb6288
4 changed files with 12 additions and 17 deletions

View File

@ -27,7 +27,7 @@ class Config:
import ConfigParser
self.config = ConfigParser.ConfigParser()
self.config.readfp(open('lampadas.conf'))
self.config.readfp(open('../conf/lampadas.conf'))
if not self.config.has_section('DB') :
raise ConfigFileReadErrorException("File 'lampadas.conf' is missing or does not contain a '[DB]' section")

View File

@ -38,11 +38,6 @@ class HTMLFactory:
class PageFactory:
def __call__(self, key, lang):
page = L.Strings['tpl-default'].I18n[lang].Text
page = page.replace('|header|', L.Strings['header'].I18n[lang].Text)
page = page.replace('|footer|', L.Strings['footer'].I18n[lang].Text)
if key[:4] == 'doc/':
docid = int(key[4:])
Doc = L.Docs[docid]
@ -61,11 +56,13 @@ class PageFactory:
return "FORMAT NOT YET SUPPORTED"
else:
page = L.Strings['tpl-default'].I18n[lang].Text
page = page.replace('|header|', L.Strings['header'].I18n[lang].Text)
page = page.replace('|footer|', L.Strings['footer'].I18n[lang].Text)
page = page.replace('|body|', L.Strings[key].I18n[lang].Text)
return page
# ComboFactory
class ComboFactory:

View File

@ -69,21 +69,19 @@ then the AutoMirror module handles it.
Mirror is intended to download files via the HTTP or FTP protocols.
*Website
The Website module generates complete web pages for serving over HTTP to web browsers.
It makes extensive use of the HTML library, which provides the primitives it
needs to build the pages.
Content of the pages themselves is held in the database, to support online editing of
page content by system administrators, and also to support internationalization.
*HTML
The HTML module generates HTML primitives, such as comboboxes, that are used to
make up the web pages. HTML generation methods require the caller to specify the
desired language as a two-character ISO code.
It also generates complete web pages for serving over HTTP to web browsers.
The content of the pages themselves is held in the database, to support online editing of
page content by system administrators, and also to support internationalization.
There is a templating system for the web pages and their text strings, which is
explained in the I18n section.
*Converter
The Converter module knows how to take documents in various formats and convert them
@ -120,7 +118,7 @@ on top of the DataLayer which implement specific functionality. Each of these ca
be consider an "extension" of the system, and any number of them could be constructed.
=Internationalization=
=Internationalization|i18n=
Internationalization, or i18n for short, means support for multiple languages.
Localization, or l10n for short, is the process of adding the translations for a particular