def has_import_permission(self, request):
IMPORT_PERMISSION_CODE = getattr(settings, '<STR_LIT>', None)<EOL>if IMPORT_PERMISSION_CODE is None:<EOL><INDENT>return True<EOL><DEDENT>opts = self.opts<EOL>codename = get_permission_codename(IMPORT_PERMISSION_CODE, opts)<EOL>return request.user.has_perm("<STR_LIT>" % (opts.app_label, codename))<EOL>
Returns whether a request has import permission.