On Wed, 2008-10-15 at 16:09 -0700, jseleuco wrote: > Hi all, > > Just started today with the Python, Django and Google app engine and > having some novice problems as well :) > > > def detail(request, poll_id): > p = get_object_or_404(Poll, pk=poll_id) > return render_to_response('polls/detail.html', {'poll': p}) > > > The get_object_or_404 method is crashing, which i really dont > understand why. > > > > > Traceback (most recent call last): > File "C:\Program Files\Google\google_appengine\lib\django\django\core > \handlers\base.py" in get_response > 77. response = callback(request, *callback_args, **callback_kwargs) > File "D:\monopolio\polls\views.py" in detail > 13. p = get_object_or_404(Poll, pk=poll_id) > File "C:\Program Files\Google\google_appengine\lib\django\django > \shortcuts\__init__.py" in get_object_or_404 > 20. return manager.get(*args, **kwargs) > > TypeError at /polls/1/ > get() got an unexpected keyword argument 'pk' > > > > > > I've tried to rename 'pk' to other things but always getting the same > TypeError.. > Im using the Django helper for the 0.96 version, running it on the > Google app SDK. > > What Im missing?
Remember that Appengine doesn't use Django's native models and queryset code. They've reimplemented that bit. So it's quite possible that they haven't implemented 'pk' as an alias for the "primary key" on a model. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---