0

I had a login app which I was using. It had a table in my sqlite3 database. I decided I didn't need it anymore and I removed 'login', from my INSTALLED_APPS and I deleted the app directory. However, now whenever I go to /admin I get:

ImportError at /admin/
No module named login

Is this because there is still a login table? How can I get rid of that? I tried python manage.py dbshell and drop table login; but it said a table named login didn't exist.

Kara
  • 6,115
  • 16
  • 50
  • 57
  • 1
    Can you post the Django DEBUG trace ? Maybe there is still a reference to the login app in your projet (just make a search in the folder), also look the app path is not present in settings.AUTHENTICATION_BACKENDS and no third party app is using the removed app. – Steve K Apr 26 '12 at 17:24

1 Answers1

3

The ImportError means there is an import login or from ... import login statement that Python can not fulfill. You could check in the printed traceback for the location of the statement. It probably in some admin.py file inside installed apps. If the error occurs during login to /admin/, you could check AUTHENTICATION_BACKENDS in settings per Lovelive's suggestion.

The error has no relationship w/ Database table normally.

okm
  • 23,575
  • 5
  • 83
  • 90
  • Actually, I hadn't changed my `urls.py` and it was still pointing to `login.etc.etc`. You make me search for `login` though, so thanks :) –  Apr 26 '12 at 19:05
  • 1
    An additional consideration: flush your Sessions DB table. The *session record* contains a reference to the class of the authenticating backend. We got bit by this several years ago. – Peter Rowell Apr 26 '12 at 20:18