def install_storage_resources(self, media_resource_class=None, static_resource_class=None):
        from hyperadmin.resources.storages import StorageResource
        from django.core.files.storage import default_storage as media_storage
        try:
            from django.contrib.staticfiles.storage import staticfiles_storage as static_storage
        except __HOLE__:
            from django.conf import settings
            from django.core.files.storage import get_storage_class
            static_storage = get_storage_class(settings.STATICFILES_STORAGE)()
        if media_resource_class is None:
            media_resource_class = StorageResource
        if static_resource_class is None:
            static_resource_class = StorageResource
        app_name = '-storages'
        self.register(media_storage, media_resource_class, resource_name='media', app_name=app_name)
        self.register(static_storage, static_resource_class, resource_name='static', app_name=app_name)
dataset/ETHPy150Open zbyte64/django-hyperadmin/hyperadmin/sites.py/ResourceSite.install_storage_resources