Posts tagged ‘dreamhost’

TurboGears on Dreamhost

I have been reading comparisons about TurboGears and Django and the other Python web frameworks. There doesn’t seem to be a clear winner in the documents I’ve read, but there are quite a few comparisons I have yet to read. But my initial impression is that with Django you can get an application up quickly, while TG would give you more power to tweak things. And that TG reuses 3rd party packages, while Django project creates similar packages for itself. This latter point made me start my experimentation with TG, although that commentary was from 2006 so maybe things have changed.

I read the documentation on how to set up TurboGears on Dreamhost, and it all seems dated and overly complicated. I plan on updating those instructions, but here’s what I did to get the Wiki20 sample running:


mkdir -p ~/bin
mkdir -p ~/python2.4/site-packages

cat >>.bash_profile
alias python=python2.4
export PYTHONPATH=/home/<username>/python2.4/site-packages
export PATH=/home/<username>/bin

source .bash_profile

wget http://www.turbogears.org/download/tgsetup.py
python tgsetup.py –install-dir=/home/<username>/python2.4/site-packages –script-dir=/home/<username>/bin

cd my.domain.name
tg-admin quickstart

mv Wiki-20/* .

# edit .htaccess
# edit dev.cfg

python start-wiki20.py

#at this point I run into the following error:
You are required to install SQLObject but appear not to have done so.
Please run your projects setup.py or run `easy_install SQLObject`.
#end error

easy_install –install-dir=/home/<username>/python2.4/site-packages –script-dir=/home/<username>/bin “SQLObject>=0.7.1dev-r1860,<=0.7.99″

python start-wiki20.py

#at this point it complained the port was taken, so I experimented until it found an unused port
#browsed over to my.domain.name which showed the app running
# but alas! it died immediately after serving that one page:
2008-01-31 21:14:00,909 cherrypy.msg INFO ENGINE: SystemExit raised: shutting down autoreloader
2008-01-31 21:14:00,910 cherrypy.msg INFO HTTP: HTTP Server shut down
2008-01-31 21:14:00,914 cherrypy.msg INFO ENGINE: CherryPy shut down

Update: TG seems to actually go down soon after start, regardless of whether it serves any pages or not.

Update 2: See my second attempt at just using Python on Dreamhost, followed by the final bits for working Pylons on Dreamhost.

Webmastering for the Finnish Language School of Silicon Valley

I volunteered as webmaster for the Finnish Language School of Silicon Valley non-profit. First I needed to renew the domain, which was just about to expire. I then took a look at the current hosting provider, doteasy.com. They don’t offer a lot, but the hosting is free without banner ads on your site, and you also get an email address. The downside is that they require you to register the domain through them, and this is at least 2-3 times more expensive than domain registrations elsewhere. All in all, not too bad but I thought I could do better.

Since I host at Dreamhost myself and I am reasonably happy with them, I asked if they had discounts for non-profits. Turns out they offer free hosting for non-profits, and I believe this also includes free domain registration. So off I went, faxed the needed documents and finally got email informing me the account was set up.

At first I set up various email addresses (unlimited number available, basically) to manage the site, and created the old contact address as well. I then set up a Subversion repository which automatically pushes changes to the live website, and sends out a commit message to me as well.

Compared to the old setup, Dreamhost offers secure shell access via ssh, unlimited accounts, more disk and bandwith, backups, and overall more tools to manage the site. And with the Subversion setup, any change can be rolled back, rather than relying on daily backups from Dreamhost. Not to mention that the commits list alerts me to any changes (via Subversion at least).

The major issue at this point is finding some free cross-platform WYSIWYG HTML tool(s) that can edit the simple HTML files via WebDAV folders. All major OSes can now mount WebDAV folders, but I was bummed to note that Kompozer does not support WebDAV (it does not even seem to help when a WebDAV folder is mounted). It is also somewhat a hassle to deal with SSL without paying for a dedicated IP and certificate, because what Dreamhost offers for free is created by them; expect warnings about unknown CA and mismatched domains. Better than nothing, I guess.

Now that the infrastructure is in place, including DNS updates, I can concentrate on updating the site content, and eventually migrate the domain registrar to Dreamhost as well.

Update: The non-profit hosting plan actually seems to include some free IPs as well as a free certificate, so I’ll need to take a look at enabling that.

Update2: I found out Seamonkey Composer supports WebDAV upload, so I am all set with open source, cross-platform WYSIWYG HTML editor that I can recommend to my users.