@method_decorator(logged_in_or_basicauth(AUTH_REALM))
    @method_decorator(group_required(API_GROUP_NAME))  # FIXME: Should be more granular permissions
    def delete(self, request):
        body = request.body
        # Catch improper mdt_id in request
        try:
            mdt_id = request.DATA.get('mdt_id')
            log.info('MetaDataTemplateHandler.delete attempted with valid request %s' % mdt_id)
        except __HOLE__, e:
            log.error('MetaDataTemplateHandler.delete attempted with invalid request %s' % e)
            if settings.DEBUG:
                raise
            else:
                return Response(status=status.HTTP_400_BAD_REQUEST)

        if mdt_id is None:
            if body:
                try:
                    d = json.loads(body)
                    mdt_id = d['mdt_id']
                except:
                    log.error('MetaDataTemplateHandler.delete attempted with invalid request %s' % body)
                    return Response(status=status.HTTP_400_BAD_REQUEST)

        # Catch mdt_id is None
        if mdt_id is None:
            return Response(status=status.HTTP_400_BAD_REQUEST)

        # Delete MDT via Manager
        manager = MetaDataTemplateManager()
        result = manager.delete_mdt(mdt_id)
        if result is True:
            log.info('MetaDataTemplateHandler.delete request fulfilled for mdt_id %s' % mdt_id)
            return Response(status=status.HTTP_204_NO_CONTENT)
        else:
            log.info('MetaDataTemplateHandler.delete request not found for mdt_id %s' % mdt_id)
            return Response(status=status.HTTP_404_NOT_FOUND)
dataset/ETHPy150Open adlibre/Adlibre-DMS/adlibre_dms/apps/api/views.py/MetaDataTemplateHandler.delete