def get_layer(self):
if self.layer:<EOL><INDENT>return<EOL><DEDENT>try:<EOL><INDENT>self.layer = Layer.objects.get(slug=self.kwargs['<STR_LIT>'])<EOL><DEDENT>except Layer.DoesNotExist:<EOL><INDENT>raise Http404(_('<STR_LIT>'))<EOL><DEDENT>
retrieve layer from DB