I need assistance with integrating the datastore to save user-agent info, please.

22 views
Skip to first unread message

Kay

unread,
Jun 25, 2014, 1:29:11 PM6/25/14
to google-a...@googlegroups.com
Hello world

Please bear with me as I'm fairly new to programming/developing. I'm already pressed for time and I need to have this part of the website working by this Friday afternoon. I've tried scouring the net for tutorials and I couldn't find any good ones in this regard.

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.

Kindest regards,
Kay

Vinny P

unread,
Jul 9, 2014, 1:53:14 AM7/9/14
to google-a...@googlegroups.com
On Wed, Jun 25, 2014 at 12:29 PM, Kay <kaym...@gmail.com> 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-Agentand the IP address via 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

Reply all
Reply to author
Forward
0 new messages