code: def is_selected(self, request):
          
          current_url = request.get_full_path()
          return self.url == current_url or \
              len([c for c in self.children if c.is_selected(request)]) > 0
docs: Helper method that returns ``True`` if the menu item is active.
          A menu item is considered as active if it's URL or one of its
          descendants URL is equals to the current URL.