{"action":"created","issue":{"url":"https://api.github.com/repos/toastdriven/django-haystack/issues/1097","labels_url":"https://api.github.com/repos/toastdriven/django-haystack/issues/1097/labels{/name}","comments_url":"https://api.github.com/repos/toastdriven/django-haystack/issues/1097/comments","events_url":"https://api.github.com/repos/toastdriven/django-haystack/issues/1097/events","html_url":"https://github.com/toastdriven/django-haystack/issues/1097","id":46910517,"number":1097,"title":"LookupError with Django 1.7 and an app without models.py","user":{"login":"deschler","id":419162,"avatar_url":"https://avatars.githubusercontent.com/u/419162?v=3","gravatar_id":"","url":"https://api.github.com/users/deschler","html_url":"https://github.com/deschler","followers_url":"https://api.github.com/users/deschler/followers","following_url":"https://api.github.com/users/deschler/following{/other_user}","gists_url":"https://api.github.com/users/deschler/gists{/gist_id}","starred_url":"https://api.github.com/users/deschler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deschler/subscriptions","organizations_url":"https://api.github.com/users/deschler/orgs","repos_url":"https://api.github.com/users/deschler/repos","events_url":"https://api.github.com/users/deschler/events{/privacy}","received_events_url":"https://api.github.com/users/deschler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2014-10-27T14:22:09Z","updated_at":"2015-01-21T15:06:55Z","closed_at":null,"body":"I'm in the process of upgrading a project to Django 1.7. Rebuilding or updating the haystack index fails in combination with django-grappelli's dashboard. Please note, that in latest grappelli, the dashboard module/app doesn't have a models.py (which is allowed in Django 1.7 as far as i understand).\r\n \r\n    $ ./manage.py rebuild_index\r\n    \r\n    WARNING: This will irreparably remove EVERYTHING from your search index in connection 'default'.\r\n    Your choices after this are to restore from backups or rebuild via the `rebuild_index` command.\r\n    Are you sure you wish to continue? [y/N] y\r\n    Removing all documents from your index because you said so.\r\n    All documents removed.\r\n    ERROR:root:Error updating grappelli.dashboard using default \r\n    Traceback (most recent call last):\r\n    File \"/path/to/env/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py\", line 189, in handle_label\r\n        self.update_backend(label, using)\r\n    File \"/path/to/env/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py\", line 203, in update_backend\r\n        for model in get_models(label):\r\n    File \"/path/to/env/local/lib/python2.7/site-packages/haystack/utils/app_loading.py\", line 41, in get_models\r\n        return [apps.get_app_config(app_label).get_model(model_name)]\r\n    File \"/path/to/env/local/lib/python2.7/site-packages/django/apps/config.py\", line 166, in get_model\r\n        \"App '%s' doesn't have a '%s' model.\" % (self.label, model_name))\r\n    LookupError: App 'grappelli' doesn't have a 'dashboard' model.\r\n    Traceback (most recent call last):\r\n    File \"./manage.py\", line 10, in <module>\r\n        execute_from_command_line(sys.argv)\r\n    File \"/path/to/env/local/lib/python2.7/site-packages/django/core/management/__init__.py\", line 385, in execute_from_command_line\r\n        utility.execute()\r\n    File \"/path/to/env/local/lib/python2.7/site-packages/django/core/management/__init__.py\", line 377, in execute\r\n        self.fetch_command(subcommand).run_from_argv(self.argv)\r\n    File \"/path/to/env/local/lib/python2.7/site-packages/django/core/management/base.py\", line 288, in run_from_argv\r\n        self.execute(*args, **options.__dict__)\r\n    File \"/path/to/env/local/lib/python2.7/site-packages/django/core/management/base.py\", line 338, in execute\r\n        output = self.handle(*args, **options)\r\n    File \"/path/to/env/local/lib/python2.7/site-packages/haystack/management/commands/rebuild_index.py\", line 16, in handle\r\n        call_command('update_index', **options)\r\n    File \"/path/to/env/local/lib/python2.7/site-packages/django/core/management/__init__.py\", line 115, in call_command\r\n        return klass.execute(*args, **defaults)\r\n    File \"/path/to/env/local/lib/python2.7/site-packages/django/core/management/base.py\", line 338, in execute\r\n        output = self.handle(*args, **options)\r\n    File \"/path/to/env/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py\", line 184, in handle\r\n        return super(Command, self).handle(*items, **options)\r\n    File \"/path/to/env/local/lib/python2.7/site-packages/django/core/management/base.py\", line 503, in handle\r\n        label_output = self.handle_label(label, **options)\r\n    File \"/path/to/env/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py\", line 189, in handle_label\r\n        self.update_backend(label, using)\r\n    File \"/path/to/env/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py\", line 203, in update_backend\r\n        for model in get_models(label):\r\n    File \"/path/to/env/local/lib/python2.7/site-packages/haystack/utils/app_loading.py\", line 41, in get_models\r\n        return [apps.get_app_config(app_label).get_model(model_name)]\r\n    File \"/path/to/env/local/lib/python2.7/site-packages/django/apps/config.py\", line 166, in get_model\r\n        \"App '%s' doesn't have a '%s' model.\" % (self.label, model_name))\r\n    LookupError: App 'grappelli' doesn't have a 'dashboard' model.\r\n\r\nDjango: 1.7.1\r\ndjango-haystack: 2.3.1\r\ndjango-grappelli: 2.6.2\r\n \r\n    INSTALLED_APPS = (\r\n        'grappelli.dashboard',\r\n        'grappelli',\r\n        # ...\r\n        'haystack',\r\n    )\r\n\r\nThe management command works when `'grappelli.dashboard'` is removed from INSTALLED_APPS.\r\n"},"comment":{"url":"https://api.github.com/repos/toastdriven/django-haystack/issues/comments/70853076","html_url":"https://github.com/toastdriven/django-haystack/issues/1097#issuecomment-70853076","issue_url":"https://api.github.com/repos/toastdriven/django-haystack/issues/1097","id":70853076,"user":{"login":"camilonova","id":202559,"avatar_url":"https://avatars.githubusercontent.com/u/202559?v=3","gravatar_id":"","url":"https://api.github.com/users/camilonova","html_url":"https://github.com/camilonova","followers_url":"https://api.github.com/users/camilonova/followers","following_url":"https://api.github.com/users/camilonova/following{/other_user}","gists_url":"https://api.github.com/users/camilonova/gists{/gist_id}","starred_url":"https://api.github.com/users/camilonova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camilonova/subscriptions","organizations_url":"https://api.github.com/users/camilonova/orgs","repos_url":"https://api.github.com/users/camilonova/repos","events_url":"https://api.github.com/users/camilonova/events{/privacy}","received_events_url":"https://api.github.com/users/camilonova/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T15:06:55Z","updated_at":"2015-01-21T15:06:55Z","body":"Any updates here to have it fixed?"}}