directly from the book
- If a view is not found, web2py tries to use a generic view. By default, generic views are disabled, although the 'welcome' app includes a line in /models/db.py to enable them on localhost only. They can be enabled per extension type and per action (usingresponse.generic_patterns). In general, generic views are a development tool and typically should not be used in production. If you want some actions to use a generic view, list those actions in response.generic_patterns (discussed in more detail in the chapter on Services). On Thursday, July 17, 2014 12:13:46 PM UTC+2, 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.