(self)
Backends follow the following naming convention:
        
        Backend module should be named <backend_name>_media_backend and should contain
        a class named <backend_name>MediaBackend which inherits from the BaseMediaBackend.
Backends follow the following naming convention:
        
        Backend module should be named <backend_name>_media_backend and should contain
        a class named <backend_name>MediaBackend which inherits from the BaseMediaBackend.
Backends follow the following naming convention : Backend module should be named <backend_name > _media_backend and should contain a class named <backend_name > MediaBackend which inherits from the BaseMediaBackend .
def _register_media_backend(self):
        """
        Backends follow the following naming convention:
        
        Backend module should be named <backend_name>_media_backend and should contain
        a class named <backend_name>MediaBackend which inherits from the BaseMediaBackend.
        """        
        backend_module = '%s_media_backend' % settings.MEDIA_BACKEND
        backend_class = '%sMediaBackend' % settings.MEDIA_BACKEND
                
        try:        
            mod = __import__('mediabackends.%s' % backend_module, fromlist=[backend_module])
        except ImportError, e:
            print e
            raise Exception('Invalid media backend specified: %s' % settings.MEDIA_BACKEND)
                
        backend_cls = getattr(mod, backend_class)
        
        username = getattr(settings, 'MEDIA_BACKEND_USERNAME', None)
        password = getattr(settings, 'MEDIA_BACKEND_PASSWORD', None)

        self._media_backend = backend_cls(settings.MEDIA_BACKEND_HOST, settings.MEDIA_BACKEND_PORT, username, password)
def _register_media_backend ( self ) : backend_module = '%s_media_backend' % settings . MEDIA_BACKEND backend_class = '%sMediaBackend' % settings . MEDIA_BACKEND try : mod = __import__ ( 'mediabackends.%s' % backend_module , fromlist = [ backend_module ] ) except ImportError , e : print e raise Exception ( 'Invalid media backend specified: %s' % settings . MEDIA_BACKEND ) backend_cls = getattr ( mod , backend_class ) username = getattr ( settings , 'MEDIA_BACKEND_USERNAME' , None ) password = getattr ( settings , 'MEDIA_BACKEND_PASSWORD' , None ) self . _media_backend = backend_cls ( settings . MEDIA_BACKEND_HOST , settings . MEDIA_BACKEND_PORT , username , password )