[kforge-user] Newbie here - howto config using sqlite?
Rufus Pollock
rufus.pollock at okfn.org
Mon Jan 15 12:14:44 UTC 2007
Neal Becker wrote:
> I'm just playing around with kforge-0.12. How can I install to use sqlite?
> The example in etc/ shows only a postgresql example.
KForge uses sqlobject so you should be able to use KForge with any
database backend supported by sqlite. However currently we create the
sqlobject uri from the information you enter in your config file as
follows (see [1]):
uri = "%s://%s:%s@%s/%s" % (dbType, dbUser, dbPass, dbHost, dbName)
Since sqlite requires uris of the form:
sqlite:///full/path/to/database
this is problematic. The obvious solution is to either:
1. Change your dm.db module to have:
if dbType == 'sqlite':
uri = '%s:/%s' % (dbType, dbName)
else:
uri = "%s://%s:%s@%s/%s" % (dbType, dbUser, dbPass, dbHost, dbName)
2. OR you could add a new uri variable to the db section of your config
and add then change dm.db module to have:
uri = self.dictionary['db.uri']
I haven't tried either of these so please let me know how it goes as it
would be good to feed whatever patch you use back into trunk.
Regards,
Rufus
[1]:http://project.knowledgeforge.net/domainmodel/trac/browser/trunk/src/dm/db.py
More information about the kforge-user
mailing list