I am writing a simple application which takes parameter from the url and simply put it to another python app and open it. If it is successful, a content of the author's blog post will be returned. The following is my code: ----------This one works------------ #Using Django v1.02 #this function works well, no problem #work in local server #I simply call http://127.0.0.1:8000/mywiki/blog/getEntry.py def getEntry(req,): URL = 'http://id:passw...@www.myschool.edu/CSserver/getPost.py? author=50898712' urlread=urllib.urlopen(URL).read() entry = handleXMLPost(urlread) return render_to_response('testsample.html',{"entry":entry})
----------------This one not works------------------------------------- #this function not work, why? #I simply call http://127.0.0.1:8000/mywiki/blog/getEntry.py?author=50898712 def getEntry(req,**kwargs): stdid=kwargs['author'] URL = 'http://id:passw...@www.myschool.edu/CSservergetPost.py?author= %s' % stdid urlread=urllib.urlopen(URL).read() entry = handleXMLPost(urlread) return render_to_response('testsample.html',{"entry":entry}) And Django debugger tells that : ---------------------------------------------- KeyError at /mywiki/blog/getEntry.py author Request Method: GET Request URL: http://127.0.0.1:8000/mywiki/blog/getEntry.py Exception Type: KeyError Exception Value: author .... .... value of author : u'50898712' Does anyone know what is wrong with my function? Any help would be appreciated. --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---