web2py always trying the app/modules folder before anywhere else. That is 
how it allows an app to bring along the modules it requires and not 
conflict with those pre-installed.

That said. The error you see does not mean it does not also look somewhere 
else.
 Do you actually have an app/modules/ldap? from the error it looks like you 
have one and it does not work. You should perhaps remove it.

On Thursday, 20 August 2015 07:20:55 UTC-5, Johann Spies wrote:
>
> Why does this happen?  The import process seems to try and import the ldap 
> module from the modules directory and not from gluon/contrib/login_methods.
>
> File "/home/js/web2py/applications/wos_2015_3/models/db.py" 
> <http://localhost:8000/admin/default/edit/wos_2015_3/models/db.py>, line 11, 
> in <module>
>     from gluon.contrib.login_methods.ldap_auth import ldap_auth
>   File "/home/js/web2py/gluon/custom_import.py", line 108, in custom_importer
>     return NATIVE_IMPORTER(name, globals, locals, fromlist, level)
>   File "/home/js/web2py/gluon/contrib/login_methods/ldap_auth.py", line 14, 
> in <module>
>     raise e
> ImportError: Cannot import module 'applications.wos_2015_3.modules.ldap'
>
>
> Regards
> Johann
> -- 
> Because experiencing your loyal love is better than life itself, 
> my lips will praise you.  (Psalm 63:3)
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to