brack3t / Djrill

[INACTIVE/UNMAINTAINED] Djrill is an email backend and new message class for Django users that want to take advantage of the Mandrill transactional email service from MailChimp.
BSD 3-Clause "New" or "Revised" License
319 stars 64 forks source link

Admin site override in django 1.7 #74

Closed jesseh closed 10 years ago

jesseh commented 10 years ago

The installation instructions for the admin site no longer work in Django 1.7 because the import order has changed.

My quick fix is to place the following lines at the bottom settings.py.

from django.contrib import admin
from djrill import DjrillAdminSite
admin.site = DjrillAdminSite()

There is probably a more correct location to do the admin.site override.

oscargicast commented 10 years ago

Just to support @jesseh comment. I get this in the admin:

You don´t have permission to edit anything.

It should be at least show a warning in the docs with the @jesseh 's quick fix since django 1.7 was released :)

medmunds commented 10 years ago

I believe the issue is that Django 1.7 now calls admin.autodiscover() automatically by default.

The solution (from that link) is to "put 'django.contrib.admin.apps.SimpleAdminConfig' instead of 'django.contrib.admin' in your INSTALLED_APPS setting" (in settings.py).

I'll update the installation docs to reflect this.