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.