[Python-es] Formulario llamar a una funcion en cherrypy
Jm. Gálvez
jm.galvez en oneandzero.net
Dom Jul 20 14:14:41 CEST 2008
Buenas.
Como puede llamar a una funcion en un formulario en cherrypy cuando esa funcion se encuentra en otro modulo que he importado.
Ejemplo:
import Funciones
class WelcomePage:
def index(self):
# Ask for the user's name.
return '''
<form action="Funciones.greetUser" method="GET">
What is your name?
<input type="text" name="name" />
<input type="submit" />
</form>'''
index.exposed = True
Funciones.py
################################
def greetUser(self, name = None):
Al hacer esto no funciona no sabe encrontrar la funcion.
Haber si alguien me puede ayudar, gracias.
Más información sobre la lista de distribución Python-es