On Aug 2, 5:08 pm, Bas <[email protected]> wrote:
>
> 1 Whats the correct syntax to get the visitors IP from a controller
> methode for further use in the controller?
in paster, the IP isn't passed in the environment:
import os
print os.environ['REMOTEHOST']
in wsgi, the IP is passed in the environment:
import os
print os.environ['REMOTE_ADDR']
With webob, I believe you can access the request object directly and
get the remote IP address:
http://turbogears.org/2.0/docs/modules/thirdparty/webob.html
> 2 I want to make edit-forms in toscawidgets, whats the syntax to pre-
> populate fields from database in toscawidget forms?
http://turbogears.org/2.0/docs/main/Wiki20/wiki20.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---