Bug 1232683 - horizon manage.py syncdb errors on "App 'openstack_auth' doesn't have a 'user' model."
Summary: horizon manage.py syncdb errors on "App 'openstack_auth' doesn't have a 'user...
Alias: None
Product: RDO
Classification: Community
Component: python-django-openstack-auth
Version: Kilo
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: Kilo
Assignee: Matthias Runge
QA Contact:
Depends On:
Blocks: 1234250
TreeView+ depends on / blocked
Reported: 2015-06-17 09:52 UTC by Jasper Spit
Modified: 2019-07-11 09:24 UTC (History)
2 users (show)

Fixed In Version: python-django-openstack-auth-1.2.0-4.el7.noarch.rpm
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1234250 (view as bug list)
Last Closed: 2015-09-10 07:19:25 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1221117 urgent CLOSED Horizon: Re login failed after timeout 2021-01-20 06:05:38 UTC

Description Jasper Spit 2015-06-17 09:52:12 UTC
Description of problem:

When running /usr/share/openstack-dashboard/manage.py syncdb --noinput after creating the database it errors with this message:

                                Traceback (most recent call last):
                                  File "/usr/share/openstack-dashboard/manage.py", line 23, in <module>
                                  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
                                  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
                                  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 390, in run_from_argv
                                    self.execute(*args, **cmd_options)
                                  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 440, in execute
                                  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 478, in check
                                  File "/usr/lib/python2.7/site-packages/django/core/checks/registry.py", line 72, in run_checks
                                    new_errors = check(app_configs=app_configs)
                                  File "/usr/lib/python2.7/site-packages/django/contrib/auth/checks.py", line 12, in check_user_model
                                    cls = apps.get_model(settings.AUTH_USER_MODEL)
                                  File "/usr/lib/python2.7/site-packages/django/apps/registry.py", line 202, in get_model
                                    return self.get_app_config(app_label).get_model(model_name.lower())
                                  File "/usr/lib/python2.7/site-packages/django/apps/config.py", line 162, in get_model
                                    "App '%s' doesn't have a '%s' model." % (self.label, model_name))
                                LookupError: App 'openstack_auth' doesn't have a 'user' model.

Version-Release number of selected component (if applicable):


How reproducible:

Steps to Reproduce:
1. Install openstack-dashboard-2015.1.0-7.el7.noarch.rpm
2. Create MySQL database & configure it in local_settings
3. Run /usr/share/openstack-dashboard/manage.py syncdb

Actual results:

Error above

Expected results:

No error and a populated horizon database.

Additional info:

Comment 1 Matthias Runge 2015-06-19 19:06:53 UTC
I was able to fix this issue by adding

from user import User


git diff
diff --git a/openstack_auth/__init__.py b/openstack_auth/__init__.py
index 67e4860..cf681c2 100644
--- a/openstack_auth/__init__.py
+++ b/openstack_auth/__init__.py
@@ -13,5 +13,6 @@
 import pbr.version
+from user import User
 __version__ = pbr.version.VersionInfo('django_openstack_auth').version_string()

A package update will follow shortly.

Comment 2 Matthias Runge 2015-06-22 08:46:03 UTC
build for f23 http://koji.fedoraproject.org/koji/taskinfo?taskID=10175913

Comment 3 Matthias Runge 2015-07-02 12:56:02 UTC
The version should be in repos now.

Comment 4 Matthias Runge 2015-07-02 13:00:18 UTC
one additional word:

for django-1.8, one should rather use
./manage.py migrate

Comment 5 Jasper Spit 2015-09-02 12:44:28 UTC
Thanks Matthias! Looking good.

Note You need to log in before you can comment on or make changes to this bug.