Hi,

On Mon, 2007-11-26 at 13:02 -0800, tinti wrote:
> Hi all,
> 
> have a really big problem getting ldap working with django.
> Tried almost everything :( My code is in the views.py :
> 
> from ldap import *
> def ldapListUsers(ldap):
>     """List all ldap users"""
>     l = ldap.initialize("ldap://localhost:389/";)
>     l.simple_bind_s("cn=Manager,dc=local,dc=net", "secret")
> 
> in my urls.py I have a line containing the following line to point to
> my definition in the view:
>     (r'^ldapListUsers/$',
> 'django_ldapAdmin.ldap.views.ldapListUsers'),
> 

This looks seriously broken. The first parameter that gets passed
to your view function is a HttpRequest object (or a WSGIRequest object
in your case), not an ldap object.

Does it work if you replace "from ldap import *" with "import ldap" and
ldapListUsers(ldap) with ldapListUsers(request) ?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to