On Thu, Sep 19, 2013 at 1:51 AM, Lauri Carpenter < lauri.loebel.carpen...@gmail.com> wrote:
> We have been using django 1.3.0 for a long time. We are now trying to > migrate to 1.5.4. We have not changed any schema or model information. We > have been using two layers of middleware and backends (notably something > based on SSLAuth Django App to authenticate first by certificate issued > from a trusted authority, then django_auth_ldap to login via ldap if no > valid certificate is presented). Both of these live on top of whatever > user/certificate/client/etc. scheme is supported in django 1.3.0. > > But under django 1.5.4 we are > seeing django.core.exceptions.ImproperlyConfigured exceptions > "AUTH_USER_MODEL refers to model 'auth.User' that has not been installed" > on the gui page when trying to log in. The chunk'o'code that handles > looking for certificate and creating a user if the certificate is presented > gets this error (so that nobody can use their certificates to log in); then > the fallback "login" view kicks in, and gets the traceback shown here; > Traceback: > File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in > get_response > 115. response = callback(request, > *callback_args, **callback_kwargs) > File "/var/www/lauri/dj/ncis_gui/ncis_gui/src/ncis_gui.py" in login > 244. return views.login(request, *args, template_name='login.html', > extra_context=ncis_context, **kwargs) > File "/usr/lib/python2.6/site-packages/django/views/decorators/debug.py" > in sensitive_post_parameters_wrapper > 75. return view(request, *args, **kwargs) > File "/usr/lib/python2.6/site-packages/django/utils/decorators.py" in > _wrapped_view > 91. response = view_func(request, *args, **kwargs) > File "/usr/lib/python2.6/site-packages/django/views/decorators/cache.py" > in _wrapped_view_func > 89. response = view_func(request, *args, **kwargs) > File "/usr/lib/python2.6/site-packages/django/contrib/auth/views.py" in > login > 53. form = authentication_form(request) > File "/usr/lib/python2.6/site-packages/django/contrib/auth/forms.py" in > __init__ > 177. UserModel = get_user_model() > File "/usr/lib/python2.6/site-packages/django/contrib/auth/__init__.py" in > get_user_model > 129. raise ImproperlyConfigured("AUTH_USER_MODEL refers to model > '%s' that has not been installed" % settings.AUTH_USER_MODEL) > > Exception Type: ImproperlyConfigured at /login/ > Exception Value: AUTH_USER_MODEL refers to model 'auth.User' that has not > been installed > > > After googling and reading whatever I could find on the subject (most > notably > http://procrastinatingdev.com/django/using-configurable-user-models-in-django-1-5/ > where > it expressly says that if you're happy with the existing stuff you don't > have to change any code) -- I am thoroughly vexed. > > What migration step have I missed in order to really use the stuff we were > using before without changes? > It's difficult to answer without knowing more about your actual setup. I don't know anything about the SSLAuth or django_auth_ldap apps, so I don't know what they're doing internally. However, because they're doing fun things with Django 1.3 authentication, it's possible they might be bending some rules, making some model changes via monkey patching, or doing otherwise unexpected things with auth. In this case, the error you're getting is caused because the auth.User model wasn't found in the app cache. This could be because django.contrib.auth isn't in INSTALLED_APPS, or because one of the apps you're using is patching the contents of the app cache for some reason. Sorry I can't be more helpful here - if you can point us at the exact repositories you're using for SSL auth and auth_ldap, it might be possible to provide some more assistance. Yours, Russ Magee %-) -- 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. For more options, visit https://groups.google.com/groups/opt_out.