Hi Django Users, I'm trying to use sapnwrfc to comunicate with SAP. Everything works fine in the python shell. But when i put the same code on the views.py nothing happens or doesn't wait to finish the connection?
I'm newbie to django so maybe i'm passing in the wrong way the variable to the template. here is my code views.py def index(request): sapnwrfc.base.config_location = '/home/user/djsites/wlan/stinfo/ proas.yml' sapnwrfc.base.load_config() t = loader.get_template('stinfo/index.html') try: conn = sapnwrfc.base.rfc_connect() fd = conn.discover("Z_WS_PANDA") f = fd.create_function_call() f.CEDULA("XXXXXXX") f.invoke() pd = f.PERSONALDATA_T.value c = Context(pd) conn.close() except Exception, e: c = Context(e) return HttpResponse(t.render(c)) index.html template: <body id="index" onload=""> Error debes llamar al url de la siguiente forma: http://desarrollo.unimet.edu.ve:8001/wlan/stinfo/16814224/ <br> Nombre: {{ pd.FIRST_NAME }}<br> Apellido:{{ pd.LAST_NAME }} </body> I'm obtained the value correctly? Sorry if this question is very simple! Need a little orientation in templates... kind regards, Nerv -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.