On Feb 27, 2011, at 12:59 PM, Sebastian E. Ovide wrote:
> yes, that is right...to see that I had to select severity "debug"...
>
> no errors are thrown... just an empty json/xml
>
> http://w2papp2.appspot.com/rest/default/restaurants (works)
> http://w2papp2.appspot.com/rest/default/restaurants.json (doen't)
> http://w2papp2.appspot.com/rest/default/restaurants.xml (doen't)
I don't have any particular insight, but I can suggest some things that I'd
try.( BTW, are you getting an empty document with the appropriate Content-Type
header, or nothing at all?)
1. Replace generic.json (temporarily) with one that does simply:
{{ raise HTTP(405,'hello from json') }}
...to make sure you're at least invoking it.
2. If (1) "works" (ie, throws a 405), try manually generating some content
there.
3. Create an explicit rest/views/default/restaurants.json and see if that makes
any difference.
4. More logging...
>
>
> On Sun, Feb 27, 2011 at 6:07 PM, Jonathan Lundell <[email protected]> wrote:
> On Feb 27, 2011, at 9:58 AM, Sebastian E. Ovide wrote:
>> Hi,
>>
>> I have a simple action:
>>
>> def restaurants():
>> restaurants=db().select(db.restaurant.ALL)
>> return dict(restaurants=restaurants)
>>
>> on my machine I can get myapp/default/restaurants.json or .xml.... but it
>> doesn't work on GAE !...
>>
>> in GAE myapp/default/restaurants work but if I append .json or .xml I would
>> get an empty json/xml...
>>
>> on GAE I see
>>
>> D2011-02-27 09:50:20.163 routes_out: [/rest/default/restaurants.json] not
>> rewritten
>>
>>
>> any ideas ?
>
>
> The message is routine, fwiw, assuming that you're not expecting that path to
> be rewritten. It's debug-level logging, but IIRC GAE logs everything.
>
>
>
> --
> Sebastian E. Ovide
>
>
>
>