What errors are you getting?
-- Dan

On Mon, Oct 20, 2008 at 11:17 AM, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:

>
> Running Python Launcher Version 2.5.1 & Google App Engine SDK release:
> 1.1.5
> on Mac OS X Version 10.4.11
>
>
> First time user, so far the tutorial is easy to follow. I get to
> "Using Datastore" "Edit the Guestbook handler to appear similar to the
> following..." and now my application will not run error-free. I simply
> copied and pasted the code found here:
> http://code.google.com/appengine/docs/gettingstarted/usingdatastore.html
>
> Up till this point I receive errors when refreshing http://localhost:8080/
> in my safari browser.
>
> This is the code I am running:----------------------------->
>
> from google.appengine.ext import db
> import cgi
>
> from google.appengine.api import users
> from google.appengine.ext import webapp
> from google.appengine.ext.webapp.util import run_wsgi_app
>
> class MainPage(webapp.RequestHandler):
>  def get(self):
>    self.response.out.write("""
>      <html>
>        <body>
>          <form action="/sign" method="post">
>            <div><textarea name="content" rows="3" cols="60"></
> textarea></div>
>            <div><input type="submit" value="Sign Guestbook"></div>
>          </form>
>        </body>
>      </html>""")
>
>
> class Guestbook(webapp.RequestHandler):
>  def post(self):
>    greeting = Greeting()
>
>    if users.get_current_user():
>      greeting.author = users.get_current_user()
>
>    greeting.content = self.request.get('content')
>    greeting.put()
>    self.redirect('/')
>
> def main():
>  run_wsgi_app(application)
>
> if __name__ == "__main__":
>  main()
>
> END-------------------------------------->
>
> If i finish and "Edit the MainPage handler to appear similar to the
> following..." I will also run into a massive error message when
> viewing the application on Safari browser.
>
> This would then be the code I am runnnig: -----------------------------
> >
>
> from google.appengine.ext import db
> import cgi
>
> from google.appengine.api import users
> from google.appengine.ext import webapp
> from google.appengine.ext.webapp.util import run_wsgi_app
>
> class MainPage(webapp.RequestHandler):
>  def get(self):
>    self.response.out.write('<html><body>')
>
>    greetings = db.GqlQuery("SELECT * FROM Greeting ORDER BY date DESC
> LIMIT 10")
>
>    for greeting in greetings:
>      if greeting.author:
>        self.response.out.write('<b>%s</b> wrote:' %
> greeting.author.nickname())
>      else:
>        self.response.out.write('An anonymous person wrote:')
>      self.response.out.write('<blockquote>%s</blockquote>' %
>                              cgi.escape(greeting.content))
>
>    # Write the submission form and the footer of the page
>    self.response.out.write("""
>          <form action="/sign" method="post">
>            <div><textarea name="content" rows="3" cols="60"></
> textarea></div>
>            <div><input type="submit" value="Sign Guestbook"></div>
>          </form>
>        </body>
>      </html>""")
>
>
> class Guestbook(webapp.RequestHandler):
>  def post(self):
>    greeting = Greeting()
>
>    if users.get_current_user():
>      greeting.author = users.get_current_user()
>
>    greeting.content = self.request.get('content')
>    greeting.put()
>    self.redirect('/')
>
> def main():
>  run_wsgi_app(application)
>
> if __name__ == "__main__":
>  main()
>
> END-------------------------------------------->
>
>
> What am I doing wrong?
> I reload http://localhost:8080/ in my browser and cannot post, I get a
> full page of Errors. Thank u.
>
> ~Adrie S.
> SilvaPrints.com
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to