Discussion:
migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)
(too old to reply)
Lauri Carpenter
2013-09-18 17:51:30 UTC
Permalink
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?

-- lauri
--
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+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
Daniel Roseman
2013-09-18 18:41:48 UTC
Permalink
Post by Lauri Carpenter
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;
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?
-- lauri
Is 'django.contrib.auth' included in your INSTALLED_APPS? Potentially
Django is stricter about this now than it used to be.
--
DR.
--
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+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
Lauri Carpenter
2013-09-19 13:20:53 UTC
Permalink
Yes, it is installed:

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
)

-- lauri
Post by Daniel Roseman
Post by Lauri Carpenter
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;
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?
-- lauri
Is 'django.contrib.auth' included in your INSTALLED_APPS? Potentially
Django is stricter about this now than it used to be.
--
DR.
--
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+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
Russell Keith-Magee
2013-09-19 00:34:35 UTC
Permalink
On Thu, Sep 19, 2013 at 1:51 AM, Lauri Carpenter <
Post by Lauri Carpenter
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;
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+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
Leonardo Giordani
2013-09-19 07:21:49 UTC
Permalink
A question to better understand your problem: do you use a custom User
model in Django 1.3?
Did you perhaps set the AUTH_USER_MODEL=auth.User in your settings.py?

If you do not need a custom user model just drop the AUTH_USER_MODEL
setting variable. Otherwise subclassthe AbstractBaseUser and set your
application's user model in the settings.py file.

Let me know if I correctly understood your issue.

Regards

Leonardo Giordani
Author of The Digital Cat <http://lgiordani.github.com>
My profile on About.me <http://about.me/leonardo.giordani> - My GitHub
page<https://github.com/lgiordani>- My Coderwall
profile <https://coderwall.com/lgiordani>
Post by Lauri Carpenter
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;
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?
-- lauri
--
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
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
--
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+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
Lauri Carpenter
2013-09-19 13:11:15 UTC
Permalink
I don't think we used a custom User model in Django 1.3, but perhaps we did
without knowing it. How would I know for sure? We aren't setting any
AUTH_USER_*** anything in our settings file, that's certain.

- We use django-admin.py syncdb to create the authentication tables and
whatever else is needed for the INSTALLED_APPS, where our installed_apps
looks like:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
)

The tables created are:
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_groups
Creating table auth_user_user_permissions
Creating table auth_user
Creating table django_content_type
Creating table django_session
Creating table django_site

- We do not use django to generate our database, we use a different tool
(dezign). Dezign generates a "create_db.sql" script from an ER diagram.
A Makefile runs the "create_db.sql" script to create the tables after the
original django-admin.py command has created the initial administrative
tables. We add one foreign key constraint to one of our tables
(client_certificates.user_id references auth_user.id).

- We use django-admin.py inspectdb (plus automated massaging of that
output) to generate the models. Our models do include classes all of the
admin tables listed above.

So, are we using the django user model, or a custom model? I would think
we are using the django user model, but...

-- lauri
Post by Leonardo Giordani
A question to better understand your problem: do you use a custom User
model in Django 1.3?
Did you perhaps set the AUTH_USER_MODEL=auth.User in your settings.py?
If you do not need a custom user model just drop the AUTH_USER_MODEL
setting variable. Otherwise subclassthe AbstractBaseUser and set your
application's user model in the settings.py file.
Let me know if I correctly understood your issue.
Regards
Leonardo Giordani
Author of The Digital Cat <http://lgiordani.github.com>
My profile on About.me <http://about.me/leonardo.giordani> - My GitHub
page <https://github.com/lgiordani> - My Coderwall profile<https://coderwall.com/lgiordani>
Post by Lauri Carpenter
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;
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?
-- lauri
--
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
.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
--
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+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
Daniel Roseman
2013-09-19 18:26:53 UTC
Permalink
Post by Leonardo Giordani
A question to better understand your problem: do you use a custom User
model in Django 1.3?
Did you perhaps set the AUTH_USER_MODEL=auth.User in your settings.py?
There was no such thing as that setting in 1.3. It's new in 1.5.
--
DR.
--
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+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
Lauri Carpenter
2013-09-19 14:41:16 UTC
Permalink
More information:

Interactively, I can get a user_model:

$ python
Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Post by Lauri Carpenter
from django.contrib.auth import get_user_model
user_model = get_user_model()
user_model
<class 'django.contrib.auth.models.User'>
Post by Lauri Carpenter
from django.conf import settings
settings.AUTH_USER_MODEL
'auth.User'
(note that the settings.AUTH_USER_MODEL is being calculated by django, not
set by us; our settings.py file does not include any reference to
AUTH_USER_anything).

But when this happens during the authentication portion of the web
interface, it causes the traceback, from somewhere within the
django.contrib.auth forms for logging in (see traceback in initial
posting).

-- lauri
Post by Lauri Carpenter
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.
[snip]
--
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+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
Leonardo Giordani
2013-09-19 15:03:31 UTC
Permalink
The way you are creating the DB is quite complicated, but I suspect that
you are not syncing the base Django applications before doing your magic
stuff. That could be the reason why Django is complaining about the
auth.User not being installed.

I would do the following:

* settings.py with the core apps
* syncdb
* inspectdb
* schemamigration --auto
* migrate

I strongly feel that your problem has to do with Django processing your
models BEFORE doing the base stuff.
Can you try this?

Regards

Leo


Leonardo Giordani
Author of The Digital Cat <http://lgiordani.github.com>
My profile on About.me <http://about.me/leonardo.giordani> - My GitHub
page<https://github.com/lgiordani>- My Coderwall
profile <https://coderwall.com/lgiordani>
Post by Lauri Carpenter
$ python
Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Post by Lauri Carpenter
from django.contrib.auth import get_user_model
user_model = get_user_model()
user_model
<class 'django.contrib.auth.models.User'>
Post by Lauri Carpenter
from django.conf import settings
settings.AUTH_USER_MODEL
'auth.User'
(note that the settings.AUTH_USER_MODEL is being calculated by django, not
set by us; our settings.py file does not include any reference to
AUTH_USER_anything).
But when this happens during the authentication portion of the web
interface, it causes the traceback, from somewhere within the
django.contrib.auth forms for logging in (see traceback in initial
posting).
-- lauri
Post by Lauri Carpenter
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.
[snip]
--
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
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
--
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+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
Lauri Carpenter
2013-09-19 15:36:40 UTC
Permalink
Ok, I have found the problem (through digging through to post more
information about it).

It turns out that in our gui application, the gui-specific settings file
was setting:
INSTALLED_APPS = (
'ncis_gui',
'ncis_sslauth',
'django_auth_ldap',
)

and did not include the apps that come by default with django. When I fix
this to contain the full list,
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'ncis_gui',
'ncis_sslauth',
'django_auth_ldap',
)

things started to work again.

Thank you for helping me to walk through all of this. Now I wonder why
this is working at all in django 1.3.0, but at least I know how to move
forward to make it work in django 1.5.4!

Thanks much, lauri
--
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+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
Continue reading on narkive:
Loading...