def ready(self):
from .models import LayerExternal<EOL>from nodeshot.core.layers.views import LayerNodeListMixin<EOL>def get_nodes(self, request, *args, **kwargs):<EOL><INDENT>try:<EOL><INDENT>external = self.layer.external<EOL><DEDENT>except LayerExternal.DoesNotExist:<EOL><INDENT>external = False<EOL><DEDENT>if external and self.layer.is_external and hasattr(external, '<STR_LIT>'):<EOL><INDENT>return external.get_nodes(self.__class__.__name__, request.query_params)<EOL><DEDENT>else:<EOL><INDENT>return (self.list(request, *args, **kwargs)).data<EOL><DEDENT><DEDENT>LayerNodeListMixin.get_nodes = get_nodes<EOL>
patch LayerNodesList view to support external layers