Closed brunobastosg closed 2 years ago
I believe the problem is in /askbot/deps/django_authopenid/ldap_auth.py:
LDAP_AUTH_FUNC_PATH = getattr(django_settings, 'LDAP_AUTHENTICATE_FUNCTION', None)
if LDAP_AUTH_FUNC_PATH:
ldap_authenticate = load_module(LDAP_AUTH_FUNC_PATH)
else:
ldap_authenticate = ldap_authenticate_default
LDAP_CREATE_FUNC_PATH = getattr(django_settings, 'LDAP_CREATE_USER_FUNCTION', None)
if LDAP_CREATE_FUNC_PATH:
ldap_create_user = load_module(LDAP_CREATE_FUNC_PATH)
else:
ldap_create_user = ldap_create_user_default
Instead of load_module
, it should call load_function
.
I'll submit a PR.
I use a custom create user function in my existing Askbot 0.10.2 instance and it's working fine. There is a
custom_user_creation.py
file in the root of the Django project. In my settings.py, there is the following entry:LDAP_CREATE_USER_FUNCTION = 'custom_user_creation.ldap_create_user_default'
. Everything works great!However, I'm trying to upgrade to Askbot 0.11.x to use Python 3 and a newer Django version. Whenever I ran
python my_site/manage.py migrate
, the following error occurs:I have tried moving this file to several folders, but the error persists.
Does anybody have any idea what could be the issue? Is this a bug or am I doing something wrong?
Thanks in advance!