I was hoping to get a lot done on the TomsGiftList project this weekend. Although I did make some progress, it was mostly an exercise in frustration. The goal was to have a user registration and login functional enough for testing. I'm not even close.
On Saturday, the big mistake was not splitting the registration web page specification into smaller units. By attempting to complete everything, I wasted a lot of time on functionality that could be done later. I dived in too fast and paid the price.
Sunday, was a different story. I needed the database model working to bridge registration and login. I played with SQLAlchemy before so I had some examples that worked. All I need to do was figure out how to integrate it with Pylons. Do you think I could find a Pylons example that worked? Every example on the Pylons web site had a problem, and without knowing more about Pylons, it was impossible to fix anything. Eventually, the Pylons Book SimpleSite Tutorial worked which was a relief. I'll have to remember to try there first next time I need help.
With a database connection setup, I can proceed with making the web pages do something useful.
Sunday, November 30, 2008
Friday, November 28, 2008
Pylons
So far I am happy I choose Pylons for the TomsGiftList project but a lack of documentation is slowing things down. So far I have a simulated login page which is not very much at all. I had trouble with login failure. The problem was how to display the login page with an error message. I first tried a redirect but that was never going to work since there was no way to pass data to the redirect. I found a better way to do it.
Pylons allows any URL to be mapped to any controller and action. You configure this in the routes.py file. You can also set specific conditions for the mapping like this:
Pylons allows any URL to be mapped to any controller and action. You configure this in the routes.py file. You can also set specific conditions for the mapping like this:
map.connect('login', controller='login', action='check',\This maps URL /login POST requests to the check method of the login controller. The path is still /login so no redirect is required. It is much more elegant but I only discovered it by accident in the Pylons tutorials. Who knows, there may be a better solution.
conditions=dict(method='POST'))
Tuesday, November 25, 2008
Online Wishlist
A few years ago I setup an online Christmas wish list for my family. It was just a PHP program that I found on the 'net, but it worked OK. Last year I had some problems on the server which broke the wish list application. I never fixed it and thought that no one would notice. I was wrong. Most of the family missed the wish list to some extent.
My plan was to write the wish list application from scratch. I wanted to try some web development in Python and this was a good opportunity. I had a year to do it, plenty of time, right? Nope. I really don't know why nothing happened. I was not very busy during the summer. I have no excuse really. With only four weeks until Christmas, I debated whether to even bother now. Its really only 2 weeks if the wish list is going to be useful at all, since most people only shop the week before Christmas.
Anyway I decided to try anyway. I'm not sure what this says about me. Am I the world's greatest procrastinator? Or maybe I just don't know a lost cause when I see one. Anyway, if the application is not functional this year, at least I'll have made a start for next Christmas, although the family may have given up on me by then.
My plan was to write the wish list application from scratch. I wanted to try some web development in Python and this was a good opportunity. I had a year to do it, plenty of time, right? Nope. I really don't know why nothing happened. I was not very busy during the summer. I have no excuse really. With only four weeks until Christmas, I debated whether to even bother now. Its really only 2 weeks if the wish list is going to be useful at all, since most people only shop the week before Christmas.
Anyway I decided to try anyway. I'm not sure what this says about me. Am I the world's greatest procrastinator? Or maybe I just don't know a lost cause when I see one. Anyway, if the application is not functional this year, at least I'll have made a start for next Christmas, although the family may have given up on me by then.
Monday, November 24, 2008
Working On-site
It looks like I will be spending time on-site at a customer for a few weeks at least. The project involves some hardware configuration so I have no option. I don't enjoy working on-site. My schedule becomes more ridged. The opportunities to work on other projects is greatly reduced. It is simply exhausting. Hopefully, I can get this project done quickly.
Interesting Weekend
Wow, I haven't posted here since October. I became very busy around that time which should have provided fodder for the blog but never has that affect. Maybe now that I have a reader, it might provide an incentive.
It was an interesting weekend. On Saturday, I had some old friends from my college days over for an old fashioned chin wag. I've know these guys about 25 years and even though we only have a get together twice a year (at best) we remain very good friends. Whenever we see each other, it is a great time so it seems not to matter that we don't see everyone all the time.
On Sunday, I visited my sister Jean for few hours. The duplex that she rents has a separate basement apartment that is empty. I checked it out as I want move early in the new year, but the apartment is way too small for me. If I was not self-employed and only needed somewhere to crash at night, the apartment would be perfect. But my office requires a more space than my bedroom. The interesting part is, if the apartment had been suitable, it would be the first time Jean and I had lived in the same building since 1981 or 82.
Finally, my brother John found my blog. OK, so why don't I tell people about the blog? No idea really, and yes it doesn't make sense, but that's me to a T. I also found out he has a Skype account so we a long chat. Strangely enough I had just talked with Jean about Skype and she was also wanted to try it.
Yes, it was a really interesting weekend.
It was an interesting weekend. On Saturday, I had some old friends from my college days over for an old fashioned chin wag. I've know these guys about 25 years and even though we only have a get together twice a year (at best) we remain very good friends. Whenever we see each other, it is a great time so it seems not to matter that we don't see everyone all the time.
On Sunday, I visited my sister Jean for few hours. The duplex that she rents has a separate basement apartment that is empty. I checked it out as I want move early in the new year, but the apartment is way too small for me. If I was not self-employed and only needed somewhere to crash at night, the apartment would be perfect. But my office requires a more space than my bedroom. The interesting part is, if the apartment had been suitable, it would be the first time Jean and I had lived in the same building since 1981 or 82.
Finally, my brother John found my blog. OK, so why don't I tell people about the blog? No idea really, and yes it doesn't make sense, but that's me to a T. I also found out he has a Skype account so we a long chat. Strangely enough I had just talked with Jean about Skype and she was also wanted to try it.
Yes, it was a really interesting weekend.
Subscribe to:
Posts (Atom)