I have a model:

class Page(db.Model):
  title = db.StringProperty(required=True)
  uri = db.TextProperty(required=True)
  created = db.DateTimeProperty(auto_now_add=True)
  modified = db.DateTimeProperty(auto_now=True)
  content = db.TextProperty()

And I've added an entity with '/work' as uri to the datastore.

In my view:

def show(request):
  page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri',
request.path).get()
  if page is None:
    return http.HttpResponseNotFound()
  else:
    return respond(request, 'pages_show', {'content': request.path})

Even when request.path is exactly '/work', the query does not return a
match.

Thanks for any advice you can give me!

And yes, i'm a python noob, App Engine is perfect to finally learn the
language.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to