On Thu, 2006-05-18 at 18:58 +0100, Andy Kilner wrote: > On Thu, 2006-05-18 at 10:47 -0500, Ian Bicking wrote: > > Oleg Broytmann wrote: > > > https://sourceforge.net/tracker/index.php?func=detail&aid=1489030&group_id=74338&atid=540674 > > > > > > I'd like to discuss the patch. I am personally against relative > > > database > > > URIs. What if you do os.chdir() in the middle of your program? > > > What do people think about it? > > > > I don't like relative-to-cwd paths generally. But I'd be comfortable > > with the more explicit sqlite:$CWD/foo > > Relative paths are useful in my case for a TurboGears project using a > small sqlite database (for testing in the early stages). The db uri is > stored in a config file which lives in a subversion repository and > therefore having to store the absolute path is a pain as it differs per > user. Yes we could store the database under /tmp but at the moment it's > convenient to include the database in the repository as well.
In the 0.9 previews of TG (not sure about 0.8) there is a config variable "top_level_dir" which points to your top package directory, so in my dev.cfg I use this for my DB URI: sqlobject.dburi="sqlite:///%(top_level_dir)s/../dev.db" The "../" will put the DB file in the directory you work from with "start-yourpackage.py" and "setup.py" -- Matthew Good <[EMAIL PROTECTED]> ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ sqlobject-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
