Ok, but I am not sure what this has to do with Django ? Maybe you should ask on a SharePoint mailing list ? And did you try running the code in a script on the command line ?
François
> On Dec 6, 2014, at 7:10 AM, Hossein Rashnoo <mhr1224@gmail.com> wrote:
>
> 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+unsubscribe@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.
--
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+unsubscribe@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/C2CC4E3F-9E56-47E2-AF74-459007BF7FC7%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment