Rodrigo,

Thank you very much. That does look simple.

If found this link which describes using 
http://code.google.com/appengine/docs/thedevwebserver.html
but it describes only what should be done on the development system. I
cannot find a page which describes your approach on the appspot
system.

I don't understand how I combine your suggestion with the template
information and <form> I already have in my "template" (which is
the .html file that creates the google map for the user, right?). Can
you say more please?

Or are you saying that I must create a separate .html page with the
information you are describing?

Oh, and do you mean literally "'login_url'" and "'login_url'" and if
not, what?

To be more specific, I already have the following in my "app".

          path = os.path.join(os.path.dirname(__file__),
'add_place.html')
          template_values = dict(place=place.place, user=place.user)
          self.response.out.write(template.render(path,
template_values))

And in my "template" I have the following code (I have snipped some).

      var place_name = '{{place|addslashes}}';
      var user_name = '{{user}}';


      var iwform = 'Enter your group\'s information:<br>'
        + '<form onsubmit="process(this); return false" action="#">'
        + 'Group Name or Initials: '
        + '<br />'
        + '<strong>' + place_name + '</strong>'
        + '<br />'
        + 'People'
        + '  <input type="text" name="people" value="do-gooders"
size="31" maxlength="31"/>'
        + '<br />'
[snip]
        + '<\/form>';

      function process(form) {
        // == populate map data
        map.setCenter(lastcenter, map.getZoom());
        var people = form.people.value;
        var contact = form.contact.value;

[snip]

        var url = "/add_place?place="+place_name
+"&center_lat="+center_lat+"&center_lng="+center_lng+"&zoom="+zoom
+"&people="+people+"&contact="+contact+"&moreinfo="+moreinfo
+"&marker_lat="+marker_lat+"&marker_lng="+marker_lng;

        // ===== send the data to the server
        GDownloadUrl(url, function(doc) {
            });

Thank you, again,


On Jan 8, 9:17 am, "Rodrigo Moraes" <rodrigo.mor...@gmail.com> wrote:
> you don't need a transaction for that. actually, it seems that you got
> completely wrong what transactions are for.
>
> what you need is to add a link so that users can login and then, after
> login, you will be able to get the current user inside your app.
>
> in your app:
>
>     template_values = {}
>     template_values['login_url'] = users.get_login_url()
>
> in your template:
>
>     <a href="{{ login_url }}">login here, buddy!</a>
>
> that's it, simple as that.
>
> -- rodrigo

Brian in Atlanta
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to