Greetings all first attempt to write an app besides Hello world. I can run the script below as a python script and it returns 52 entries.
When I run it in web2py it only show me one result. It's an API call that get results in JSON format. def index(): import requests import json url = "https://10.10.10.1/api/2.6/" object_type = "config_templates/search" data = requests.get(url + object_type, verify=False, auth=('user', 'userpwd')) json_input = data.text try: decoded = json.loads(json_input) for entry in decoded['config_templates']: return entry['name'] except (ValueError, KeyError, TypeError): return "JSON format error" Is there something I'm missing? Thanks in advance, Sif -- 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.