I'm using a PersonEditHandler class in tipfy to edit a Person entity. I have the get() and post() methods formed, but when I reference self.person (to check if the get method found the existing person by key), I get an 'object has no attribute' error.
This is because I never initialize it in the init method since I'm inheriting from RequestHandler and Jinja2Mixin. However, when I override init, I get another error: 'TypeError: init() takes exactly 1 argument (3 given)'
Here is the code:
class PersonEditHandler(RequestHandler, Jinja2Mixin):
def __init__(self):
PersonEditHandler.__init__(self)
# ...or 'super(PersonEditHandler, self).__init__()'
self.person = None
Am I having trouble because of multiple inheritance? What is the best way to edit a retrieved record in tipfy without creating a new one?