One thing to check
Your query as pasted is
page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri',
request.path).get()
I think it should read
page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri',
uri=request.path).get()
or
page = db.GqlQuery('SELECT * FROM Page WHERE uri=:1',
Yes that idd correct, i provided a wrong sample.
But even when using correct named or positional parameters, it does
nog match.
Is it possible it has todo with escaping. The uri contains '\work'.
I've used Django Forms the generate a form for the Page entity. Does
it auto escape?
Thanks!
On
Do you mean \work' or '/work'
'\' is an escaping character
T
On Mar 21, 8:19 pm, Versluys Sander versluyssan...@gmail.com wrote:
Yes that idd correct, i provided a wrong sample.
But even when using correct named or positional parameters, it does
nog match.
Is it possible it has todo with
Just to test what is actually in I would do the following
Page.all():
and iteraterate through the items and do a repr on the url to just
check what is actually stored.
And alternatley try us the above approach rather than gql as in
Page.all().filter('uri = ',uri)
Rgds
T
and iterate through
Again, you're right. This is getting really embarrassing :-)
Yes i'm mean forward slashes as used in urls, so '/work'.
Thanks!
On 21 mrt, 12:37, Tim Hoffman zutes...@gmail.com wrote:
Do you mean \work' or '/work'
'\' is an escaping character
T
On Mar 21, 8:19 pm, Versluys Sander
In fact you should do a manual loop comparison
for i in Page.all():
if i.uri == uri:
do something
This will provide that uri you have and the value in the model match.
T
On Mar 21, 8:41 pm, Tim Hoffman zutes...@gmail.com wrote:
Just to test what is actually in I would do the
Tim, that's great advice. I'm still getting used to having a
interactive console for this debug sort of thing.
With following code the console print my '/work' uri so, this way i
get a match.
from pages import models
for i in models.Page.all():
if i.uri == '/work':
print i.uri
But when
Hi
On Mar 21, 9:38 pm, Versluys Sander versluyssan...@gmail.com wrote:
Tim, that's great advice. I'm still getting used to having a
interactive console for this debug sort of thing.
No probs
Now I am really stumped ;-) Can you do a filter on any other
attribute of that entity and see if
I've added you as developer just so you could write a GQL query or add
entities yourself, if you want to...
http://beta.nekudo.com/pages
anyway thanks, you've already narrowed it down...
On 21 mrt, 15:36, Tim Hoffman zutes...@gmail.com wrote:
Hi
On Mar 21, 9:38 pm, Versluys Sander
Ahhh
I had wondered how you had defined it, but was thinking that maybe the
indexes hadn't been built yet or something
like that.
Cheers
T
On Mar 22, 3:06 am, Versluys Sander versluyssan...@gmail.com wrote:
Tim, couple minutes after I invited you as developer and while trying
some queries,
10 matches
Mail list logo