horsetrailratings.com Goes Live

My first Pylons-based web application is now online. Go check out horsetrailratings.com. As the name implies, it is a place you can use to find a nice place to go ride a horse. I’ve just spent a week on this, so it is pretty rudimentary: find trails, add trails and rate them at the same time. More functionality and nicer UI will follow.

My main problem with SQLAlchemy turned out to be that I had specified one of my parent-child relationships backwards in the mapper. The other problem was that even though SQLAlchemy documentation claimed it would automatically figure out what kind of relationships I needed (one to one, one to many, …), I in fact needed to specify all of these manually.

I put in a little caching in the form of Beaker and pagination support using Paginate (there is a webhelper too, but the documentation was practically nonexistent so I decided to install Paginate – it seems like there are plans to replace the webhelper with it). Thanks to the Pylons Cheatsheet for the Paginator tip.

As for deployment on Dreamhost, I had already worked out most of the kinks. The final bit was fixing routes to take out the FastCGI script from URLs. To my surprise I still run into a few kinks: one Mako template was complaining about duplicate keyword arguments in the Dreamhost deployment, but not on my local system, which was weird. It was a real bug, though, and easily fixed. Another problem was that I was using SQLAlchemy 0.4.0 for development, but had installed 0.4.2something on Dreamhost, and it seemed to be slightly incompatible (could not add new trails). After downgrading to 0.4.0 everything seems to be working correctly. Keep your fingers crossed.

Similar Posts:

    None Found