Custom view for admin main page

I want to show some information on the admin index.html, but I do not want to use context processors for this, but have my own view.

So I tried like described in the docs and discussed here.

My app is called virtual, so I did:

in virtual/

class VirtualAdminSite(admin.AdminSite):
    index_template = "virtual/admin_index.html"

    def index(self, request, extra_context=None):
        extra_context = extra_context or {}
        return super().index(request, extra_context)

admin_site = VirtualAdminSite(name="virtualAdminSite")

in virtual/

class VirtualAdminConfig(AdminConfig):
    default_site = "virtual.admin.VirtualAdminSite"

in project/

INSTALLED_APPS  = ["virtual.apps.VirtualConfig",
                   "virtual.apps.VirtualAdminConfig", ...]

I then run in to the error:

ImportError: Module "virtual.admin" does not define a "VirtualAdminSite" attribute/class

If I use "django.contrib.admin" instead of virtual.apps.VirtualAdminConfig everything works just fine.

so two questions:

  1. why does this error happen, I feel I copied that straight from the docs?
  2. I assumed I could add some variables in the VirtualAdminSite extra_context and show them in the index template by using {{ variable_name }} - is this correct?