dimanche 2 novembre 2014

Whats the right way of using user defined Functions inside a classes in web.py


Vote count:

0




Whats the right way of using user defined Functions inside a classes in web.py?


I want the user defined functions to be used inside the index class POST function .


i tried using self. someFunction() with no help. Can anyone tell me whats the right way of doing it



class index():

def GET(self)
return 'Hello'

def POST(self):
data = web.data()
someFunction()
someFunction2()


def someFunction():
print "I want this function to be used in index.POST body"


def someFunction2():
print "I want this function also to be used in index.POST body"


def main():
app = web.application(URLS, globals())
app.run()

if __name__ == "__main__":
main()


asked 1 min ago







Whats the right way of using user defined Functions inside a classes in web.py

Aucun commentaire:

Enregistrer un commentaire