I need to connect my project to sharepoint. So i installed "sharepoint 
0.4.1" package and then use this code in my view :

from sharepoint import SharePointSite, basic_auth_opener

def userloginres(request):
server_url = "http://portal:8080/";
site_url = server_url + "rashno/"
opener = basic_auth_opener(server_url, "my username", "my password")
site = SharePointSite(site_url, opener)

htt=r"<h2>Sharepoint lists</h2><ul>"
for sp_list in site.lists:
htt = htt + r"<li> %s ..... %s </li>" % (sp_list.id,sp_list.meta['Title'])
htt = htt + r"</ul>"

t = get_template('userlogin/userloginres.html')
html= t.render(Context({"htt":htt}))
return HttpResponse(html)

But now when i open that url this error appear:

URLError at /test/login/

<urlopen error [Errno -2] Name or service not known>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a982dfcf-6824-441a-ab5f-f68907e1f0d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to