So I'm working on a simple app to get my feet wet with Google App Engine and it seems fairly powerful and straightforward... but I keep running into odd problems.
Part of the problem is I have very little Python experience. It could be that the errors I'm seeing would make sense to me if I had more Python Chops.
Anyway, here's a synopsis of the issue:
So I have this webapp Handler defined:
car_state = CarStatus(owner = 'andrewwatson.mp',license_plate = '12345')
and I have this Model object:
license_plate = db.StringProperty()
timestamp = db.DateTimeProperty(auto_now_add=True)
owner = db.StringProperty()
But all references to 'self' result in errors. Any reference to car_state after the CarStatus() constructor also fail. Other handlers in the app (like the ones that handle OpenID login for example) are written the exact same way and work fine. All the examples on the Google App Engine site work that way too.
Any Ideas? Please Help Me! I want to make this work!
*** UPDATE ***
Adam Dill was quick to point out that I needed to be using Soft Tabs in TextMate and once I did that the other problems magically fixed themselves!
It still makes me wonder about the platform that something like that could break an application in such non-obvious ways but I'm glad to get past that point so I can work on breaking it in another, more interesting way :)