Because generic views are used on localhost. For security, production 
servers will not serve generic files. You either turn off that security 
(not recommended, do the next thing) or create the individual view files 
you need for the corresponding function/action in the controller.

On Thursday, July 17, 2014 6:13:46 PM UTC+8, John Drake wrote:
>
> This is odd.  On my local test server I can do something like:
>
> http://localhost:8000/myapp/mycontroller/myfunction.json
>
> and I get back a JSON document.  But when I try the same code on the same 
> application running on Pythonanywhere I get:
>
> invalid view (mycontroller/myfunction.json)
>
> Just to make sure it wasn't something I coded wrong, I tried this with the 
> built in "Welcome" app.
>
> https://johnmdrake.pythonanywhere.com/welcome/default/index.json
>
> I get the above error message.  If I do:
>
> http://localhost:8000/welcome/default/index.json
>
> I get the JSON doc I want.  What's going on here?
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to