Issue #86 invalid

Dashboard breaks admin login

hirunatan
created an issue

I have a quite weird problem. If I install dashboard app, drop the database and create it again with syncdb, then i'm not able to log in the admin (when I type the admin user and password and press the button, the login screen appears again, without any error message).

I have a workaround, that is a) comment the dashboard app in settings.py b) drop and recreate the database c) uncomment dashboard and do again the manage.py syndb. Then, the admin login works perfectly.

I have absolutely no clue of what is happening here. I have even debugged the django admin's login view, but i'm not able to understand why does it fail, or why does it fix with this workaround. But I have replicated the problem in several computers and browsers, and it's consistent.

I have Django 1.3.

Comments (2)

  1. hirunatan reporter

    I respond myself. Finally, it was no problem of Dashboard. It was a bug in my application.

    I explain it, for if someone is interested.

    The problem is that we have modified the auth system of Django, and created several subclasses for User. And we have added a content_type field to it, that is a FK for ContentType.

    The admin user is created with a fixture (initial_data.json), that creates it and sets a content_type of 14. But when we add Dashboard application, a new type is created and the ids of all ContentTypes vary, so the fixed 14 now points to another type, that is not an Administrator user. So the whole system goes crazy.

    This is the reason because it works if we first comment out Dashboard, create the database and then add Dashboard and resync. This way the new type is created with a content type with a higher id and does not affect other types.

    So it was completely our problem, not related with Dashboard or django-admin-tools at all.

    Thanks for your attention, and my apologizes for any inconvenience caused.

  2. Log in to comment