Kevin Dangoor wrote:
> On 05 Dec 2005 09:35:35 -0200, Jorge Godoy <[EMAIL PROTECTED]> wrote:
>
> Jorge is right here. That's the point of the config file: it sits
> outside of your code so that you can conveniently change the values
> there at the deployment site without worrying about code upgrades and
> the like.
>
> Anything that should move around with the app likely belongs in your
> Python, and anything that should be changed at deploy time belongs in
> the config.
>
'tg-admin quickstart' seems to automatically perform an 'svn add' on
both .cfg files when run inside a svn workspace. Personally, I like
storing my dev.cfg in version control. It greatly shortens the path for
setting up new development workspaces/machines/etc.
prod.cfg on the other hand, isn't something I can safely store in svn
because it contains sensitive/volatile username/password information.
Generally, I have to rely on server admins to install and configure my
software. In practice, this usually means generating my prod.cfg from
an interactive python script run by my admins. Now that I think of it,
this could be a useful sub-command for tg-admin...
$ tg-admin quickstart
Enter project name: BarMate
Enter package name [barmate]:
Selected and implied templates:
TurboGears#turbogears web framework
Variables:
package: barmate
project: BarMate
turbogearsversion: 0.9a0dev-r193
Creating template turbogears
Creating ./BarMate/
Recursing into +package+
Creating ./BarMate/barmate/
Copying __init__.py to ./BarMate/barmate/__init__.py
Copying controllers.py_tmpl to ./BarMate/barmate/controllers.py
Copying model.py_tmpl to ./BarMate/barmate/model.py
Recursing into sqlobject-history
Creating ./BarMate/barmate/sqlobject-history/
Copying empty to ./BarMate/barmate/sqlobject-history/empty
Recursing into static
Creating ./BarMate/barmate/static/
Recursing into css
Creating ./BarMate/barmate/static/css/
Copying empty to ./BarMate/barmate/static/css/empty
Recursing into images
Creating ./BarMate/barmate/static/images/
Copying empty to ./BarMate/barmate/static/images/empty
Copying favicon.ico to
./BarMate/barmate/static/images/favicon.ico
Recursing into javascript
Creating ./BarMate/barmate/static/javascript/
Copying empty to ./BarMate/barmate/static/javascript/empty
Recursing into templates
Creating ./BarMate/barmate/templates/
Copying __init__.py to ./BarMate/barmate/templates/__init__.py
Copying master.kid to ./BarMate/barmate/templates/master.kid
Copying welcome.kid to ./BarMate/barmate/templates/welcome.kid
Copying +package+-start.py_tmpl to ./BarMate/barmate-start.py
Recursing into +project+.egg-info
Creating ./BarMate/BarMate.egg-info/
Copying PKG-INFO to ./BarMate/BarMate.egg-info/PKG-INFO
Copying sqlobject.txt_tmpl to
./BarMate/BarMate.egg-info/sqlobject.txt
Copying __init__.py to ./BarMate/__init__.py
Copying dev.cfg_tmpl to ./BarMate/dev.cfg
Copying prod.cfg_tmpl to ./BarMate/prod.cfg
Copying setup.py_tmpl to ./BarMate/setup.py
Running /opt/local/bin/python setup.py egg_info
Adding Turbogears to paster_plugins.txt
running egg_info
writing requirements to ./BarMate.egg-info/requires.txt
writing ./BarMate.egg-info/PKG-INFO
writing top-level names to ./BarMate.egg-info/top_level.txt
[EMAIL PROTECTED] ~/twistedrails.org/trunk
$ svn st
A BarMate
A BarMate/prod.cfg
? BarMate/BarMate.egg-info/top_level.txt
? BarMate/BarMate.egg-info/paster_plugins.txt
? BarMate/BarMate.egg-info/requires.txt
A BarMate/BarMate.egg-info
A BarMate/BarMate.egg-info/sqlobject.txt
A BarMate/BarMate.egg-info/PKG-INFO
A BarMate/__init__.py
A BarMate/setup.py
A BarMate/barmate
A BarMate/barmate/sqlobject-history
! BarMate/barmate/sqlobject-history/empty
A BarMate/barmate/__init__.py
A BarMate/barmate/model.py
A BarMate/barmate/static
A BarMate/barmate/static/images
! BarMate/barmate/static/images/empty
A BarMate/barmate/static/images/favicon.ico
A BarMate/barmate/static/javascript
! BarMate/barmate/static/javascript/empty
A BarMate/barmate/static/css
! BarMate/barmate/static/css/empty
A BarMate/barmate/controllers.py
A BarMate/barmate/templates
A BarMate/barmate/templates/master.kid
A BarMate/barmate/templates/welcome.kid
A BarMate/barmate/templates/__init__.py
A BarMate/dev.cfg
A BarMate/barmate-start.py