Closed beniwohli closed 12 years ago
this allows (in an unfortunately quite crude way) to set per-adminsite configuration:
from django.contrib.admin import AdminSite class SimpleAdmin(AdminSite): # todo: add templates here (see attrs on base class) ADMIN_SHORTCUTS = [{ 'shortcuts': [{ 'url': '/', 'open_new_window': True, },], },] def index(self, request, extra_context=None): extra_context = extra_context or {} extra_context['ADMIN_SHORTCUTS'] = self.ADMIN_SHORTCUTS return super(SimpleAdmin, self).index(request, extra_context) supplier_admin = SimpleAdmin()
this allows (in an unfortunately quite crude way) to set per-adminsite configuration: