Matthew Good wrote:
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"
I think the config file is the right place to handle this, and similarly
in Paste it would be sqlite://%(here)s/../dev.db. But I also appreciate
that this might not be available for every config format, so variable
substitution might be okay; that it doesn't look that pretty doesn't
seem like a very meaningful criticism.
Though honestly SQLObject shouldn't really be in the business of doing
variable substitutions; more layers of substitution and quoting gets
annoying if you aren't using them. So maybe it is best just to allow
relative paths; at least it's pretty obvious what it means.
--
Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org
-------------------------------------------------------
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