Hi

Your filter should read

Newsletter.all().filter('pk = ', 'PK VALUE').get()

T

On Apr 14, 11:20 am, Wiiboy <[email protected]> wrote:
> I've got a site running on app-engine-patch and Django.  I need to
> know how to get one row from the DB when I know a certain value, like
> a primary key.
>
> I've tried the pk:
> Newsletter.all().filter('pk', 'PK VALUE').get()
>
> But that returns None, although when I do (something just like):
> y = Newsletter.all().fetch(100)
> if 'PK_VALUE' in y:
>    return HttpResponse('Pk correct')
>
> It returns 'Pk correct'.
--~--~---------~--~----~------------~-------~--~----~
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