SQLAlchemy Does Not Want To Play With Me

I am on my fifth day of my first Pylons project, and I have almost all of the functionality in that I was aiming for the first release. I can now even enter data to a MySQL database, and I have input validation covered using FormEncode, and I even put in a little AJAX in the form of embedded Google Map.

I do have some problems, though. The form validation, while working, signals errors in a new page which just shows the errors but not what field they applied to, which is not very helpful. I used the @validate decorator. The @validate decorator also takes a form parameter that isn’t very clear to me: it seems it must be a method on my controller, but the method is not called???

There are some things I’d like to do with Google maps but haven’t yet seen how to do that. Things like putting an event listener on a marker I drew, and putting in that nice “get directions” in the info window.

But what bugs me the most is SQLAlchemy. Supposedly, once you set up the object relational mapping, you should be able to access child objects as if they were regular Python attributes. I assume you should also be able to set them on creation. But so far my attempts haven’t been very successful (I may have gotten a one to one reference working, but I am currently stuck at one to many). I can kludge things by manually managing relationships, but that is not very fail safe. But since this is getting to be one of the last blockers I expect to be done soon with the functional parts.

PS. The Concepts of Pylons document should really be the first link on the Pylons documentation page. Otherwise the documentation feels disconnected.

Similar Posts:

    None Found