I have a request that maps to this ChatMsg class. It takes in 3 to get the variables, username, room name and msg. But on this last line this does not work.
class ChatMsg(webapp.RequestHandler):
def get(self):
username = urllib.unquote(self.request.get('username'))
roomname = urllib.unquote(self.request.get('roomname'))
When he tries to name the room, he tells me:
<type 'exceptions.NameError'>: name 'self' is not defined
Traceback (most recent call last):
File "/base/data/home/apps/chatboxes/1.341998073649951735/chatroom.py", line 239, in <module>
class ChatMsg(webapp.RequestHandler):
File "/base/data/home/apps/chatboxes/1.341998073649951735/chatroom.py", line 242, in ChatMsg
roomname = urllib.unquote(self.request.get('roomname'))
What the hell is going on to make yourself undefined
source
share