code: def get_widget_from_id(id):
      
  
      res = id.split('-')
      try:
          model_cls = apps.get_model(res[0], res[1])
          obj = model_cls.objects.get(parent=res[2], id=res[3])
      except:
          obj = None
      return obj
docs: returns widget object by id
  
      example web-htmltextwidget-2-2