initialization is copied from django-xadmin.