Thanks!
While I have not deployed a TG app myself, there are a few ways to go
about it. It seems, so far, that you have 2 options in deployment:
Mod_python or Lighttpd.
Take a look here:
http://trac.turbogears.org/turbogears/wiki/DocumentationPlayground
And what about the TG components? How can I make a machine in which TG
isn't installed, run an app written in TG? Is it necessary to install
TG in the target machine too?
Thanks. :-)
Note also that as long as the setup.py lists TurboGears as a
requirement, it should be possible for somebody to install your
application with just the .egg and easy_install - including the
installation of TurboGears itself, with all its dependencies.
This is a pretty killer feature for application deployment, especially
since it will also upgrade TurboGears if you use an app that needs a
later version of something, etc. If your application has other
dependencies besides TurboGears, those can get installed too.
use the none-root installation for Turbogears
Then just tarball the whole directory of it and send to the target
machine. So long the base system is relatively compatible(x86 won't
work on PPC), this is the easiest. It also has the advantage of self
contained and don't need to worry about what version of certain
component the target use. This is especially handy for packages that
needs stability. I can have different versions of my app running at the
same time(upgrades, UAT, mirgration) without messing with the source
code of "require package-version". Of course, this is not for some
arbitary download and install type scenario which the setuptools is
designed for.
Of course, if your app requires setuid type privledges, it may not
work.
Anyway, after *a lot* of effort, I got the whole thing running. I don't
know if it's me, but it looks *really* awkard in deployment. I mean,
you have to setup a proxy server and then find a way to daemonize your
app's -start.py just to have your app running? (I never managed to do
this.) IMHO, there should be an easier method of deployment -- although
I don't know if it is technically feasible. This is what most
frameworks lack.
Beside, I don't mind the manual procedures of setting apache proxy and
the like as I would like to know what I am doing rather than some
really automatic things which unless is really well written(which is
difficult and I seldom find one that is, especially on *nix except for
the core system packaging), would fall apart and I need to debug
someone else' smart script which is not smart enough.
As for the manual procedures, I was mostly comparing the Python
frameworks with PHP. God, I *hate* PHP's ugliness and I adore Python's
cleaness, but the one good thing that PHP *has* is instant deployment
-- it beats everything else, hands-down. Deployment is, and always was,
the cause of me having difficulties with the various frameworks (and
the reason I still program in PHP).
Anyway what i wanted to say is that, that table is not part of your
model, so things like sqlobject-admin create,sql,drop wont alter it.
I had a little trouble with it since i had a typo on one class, i put a
"test" field instead of "text" the 1st time i was trying to use
catWalk, and it got stuck on there, throwing errors until i find that
table and fix it.
As for creating the database, i think 20minwiki should say that
explicitly somewhere, don't need to say how, just that you must create
the db first.