Intanto grazie, ma il mio problema non tanto nella submit della form ma nel passaggio delle variabili dal controller al kid : es @expose(template="maggiorenni") def VerificaMaggiorenne(self, **kw):
if kw['giorno']== 'none' or kw['anno'] == 'none' or kw['mese'] == 'none': eNascita = {'esito':'errore','testo':'Inserire una data valida'} raise redirect ("index", dataNascita='',eNascita = eNascita ) clr = Clr(DataOra = datetime.now()) hub.commit() data = kw['anno']+'-'+kw['mese']+'-'+kw['giorno']+' 00:00:00' formato = "%Y-%m-%d %H:%M:%S" dataNascita = datetime.strptime(data,formato) oggi = datetime.now() delta = oggi - dataNascita clr.DataNascita = dataNascita hub.commit() if delta.days/364 < 18: clr.Esito = 'MINORENNE' hub.commit() return dict(testo = 'minorenne') else: raise redirect ("Anagrafica", dataNascita = dataNascita,clrId = clr.id) quando vado in anagrafica, nella barra vedo visualizzato il valore della dataNascita ed il valore dell'idClr invece vorrei che nella barra non venisse visualizzato nulla. Grazie Lori 2014-04-16 21:28 GMT+02:00 Carlos Catucci <carlos.catu...@gmail.com>: > > 2014-04-16 18:49 GMT+02:00 Lorena Doria <ldor...@gmail.com>: > > parto subito con la mia domanda che per i più di voi sarà una banalità sto >> sviluppando un mini-sito in python 2.5 con turbogear e quando passo le >> variabili alla pagina html le stesse me le ritrovo scritte nella barra di >> navigazione come posso fare ad ovviare a questa cosa? > > > E' un po' che non uso TG, ma direi che tu fai le chiamate in GET invece > che in POST > > http://www.w3schools.com/TAGS/ref_httpmethods.asp > > GET and POST are two different types of HTTP requests. > > According to Wikipedia: > > GET requests a representation of the specified resource. Note that GET > should not be used for operations that cause side-effects, such as using it > for taking actions in web applications. One reason for this is that GET may > be used arbitrarily by robots or crawlers, which should not need to > consider the side effects that a request should cause. > > and > > POST submits data to be processed (e.g., from an HTML form) to the > identified resource. The data is included in the body of the request. This > may result in the creation of a new resource or the updates of existing > resources or both. > > So essentially GET is used to retrieve remote data, and POST is used to > insert/update remote data. > > Comunque se metti qualche snippet di codice riesco a essere piu' preciso. > > Carlos > -- > Coloro che sognano di giorno sono uomini pericolosi, perche' sono capaci > di recitare a occhi aperti il loro sogno fino a renderlo possibile. Ed e' > questo che feci anch'io. - (T.E. Lawrence) > > _______________________________________________ > Python mailing list > Python@lists.python.it > http://lists.python.it/mailman/listinfo/python > > -- Lorena D'oria
_______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python