[Twisted-web] Getting URL
Michael M
m.milvo at gmail.com
Sun Sep 11 10:12:01 MDT 2005
I'd like to help but I don't understand what you are trying to do,
what are you trying to achieve?
Maybe something like,
1.) User clicks http://myurl.com/arguments
2.) data_header recieves arguments
3.) want to change arguments to something else.
4.) data_content recieves changed arguments
??
Regards
Michael
On 8/19/05, Alberto Trujillo <alberto.trujillo at ucd.ie> wrote:
> Could anybody help me with this piece of code. I would like to add to
> the url the information that is placed in the line "50", but looks not
> possible. The url shoul be like the url in the line "51".
>
> def data_header(self, ctx, data):
> """return the content for the head of the template"""
> http_equiv = ''
> content = ''
> self.loginOK = False
> myform = ctx.arg('form')
> if (myform == 'login') and (self.executeLogin(ctx)):
> self.loginOk = True
> http_equiv = 'refresh'
> href = url.here.curdir()
> href = href.add('content', 'home')
> 50 #content = '3;URL=' + href
> 51 content = '2;URL=http://localhost:8088/'
> return {'http_equiv':http_equiv, 'content':content}
>
> Another question.
> While I'm processing the call from an url, is possible to change the
> values from the arguments? I mean, in this example I have a template
> that calls to different fragments (header, navigation, content, footer),
> the data_header method inside the template is the first one in the
> calls. Could I change here the value of one argumentin such a way that
> when the data_content method inside the template is called, this one
> receives the new value.
>
> Thank you very much
>
> _______________________________________________
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>
More information about the Twisted-web
mailing list