Conversations With Myself
Tuesday, March 14, 2006
  Python: Templates in TurboGears, and a solution to SQLObject Problem
Well, I got templates working, and it was not as bad as it could have been. Plus I found an example of looping through a SQLObject and it is rather elegant. Although I have not implemented. I should be able to do something like this:


for Table.field in Table.select(Table.q.select(fred=1)):
do something here.


Once I get the real code working I will post it.

Templates are fun, but at times frustrating, plus I think I was trying to do something you can't easily do, nested for loops in a template. Just didn't work, so I went a different way. So my homepage for my project is about 30% complete, it is taking me a little longer than I would like, but then that is what happens when you are learning something for the first time.

Plus I found some idiosyncrasies with extended templates not being picked up without a restart of the CherryPy Server, but that made sense to me for some reason. I figure it grabs the master.kid which is being extended when it starts and does not check to see if it has changed and needs to be reloaded.

I do like the fact that CherryPy know when the controllers.py or model.py file is saved, that might be TurboGears doing that, but it is cool you change the page save it and the server shuts down and restarts.

So all in all I nice system. Oh also, yesterday I upgraded to TurboGears 0.9 to get all the new features, of course there is very little documentation on these features so I have not had a chance to explore them.

But it was fun working on it when I wasn't in meanings and doing real work. Although I just have to convince my boss that real company projects can be developed in this language.

Java, not my favorite language is what I am working in for the current project. In fact once I finish the authentication pages that I am working on, I will look into implementing our new front-end with JSFaces, looks sort of .NET like, and I enjoyed that once I learned it so we will see how that goes over the next few weeks. So I should have more side by side compares and experiences to relate in the near future.
 
Comments: Post a Comment



<< Home
Here you will find what I find interesting to comment on. What interests me is Music, especially Church Music. Photography, Programming, Golf, and Politics.

Name:
Location: Thorndale, Pennsylvania, United States

I have been married for almost 23 years, and am the father of a teenage girl. I spend my days programming in just about any language they want in the banking and investing field. In the evening I work on my music, currently concentrating on arrangements and new choral pieces for my Church Choir. I have been Minister of Music, at my church for the past year, looking forward to next year. When I have time, I take pictures of anything and anyone. Also I play golf, not very well, but I enjoy it. Finally what I enjoy most is spending time with my family.

Blogs I Read

ARCHIVES
June 2005 / July 2005 / August 2005 / September 2005 / November 2005 / December 2005 / January 2006 / March 2006 / April 2006 / May 2006 / January 2007 /


Terror Alert Level

Powered by Blogger