On Wed, Jun 25, 2014 at 12:29 PM, Kay <[email protected]> wrote: > Basically I need someone to please help me with making my website (which > is just 5 pages with text and inputs - its realy small) store user agent > info and the ip address in a database (datastore). A script and direction > on how to implement it would be really useful, but any form of help will be > greatly appreciated. I will need the database to store the info in separate > columns so I can access the info in a flexible way. > > On request, I will gladly provide you with the link to the website and > the main.py file if you think that will help. >
Hi Kay, You can just attach the main.py file and send it to this mailing list. But essentially what you'd want to do is look up the requesting header " *User-Agent*" and the IP address via remote_addr <https://developers.google.com/appengine/docs/python/tools/webapp/requestclass#Request_remote_addr>. Then you can save any form information and the IP/user-agent into the datastore - see an example of form data being saved here: https://github.com/GoogleCloudPlatform/appengine-guestbook-python ----------------- -Vinny P Technology & Media Consultant Chicago, IL App Engine Code Samples: http://www.learntogoogleit.com -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/d/optout.
