

def process(self, request):
    '\n        process determines if this item should visible, if its selected, etc...\n        '
    children.check(request)
    if (not self.visible):
        return
    if callable(self.title):
        self.title = self.title(request)
    if (self.slug is None):
        if (sys.version_info > (3, 0)):
            self.slug = slugify(self.title)
        else:
            self.slug = slugify(unicode(self.title))
    if callable(self.children):
        children = list(self.children(request))
    else:
        children = list(self.children)
    for child in children:
        child.parent = self
        child.process(request)
    self.children = [child for child in children if child.visible]
    self.children.sort(key=(lambda child: child.weight))
    hide_empty = getattr(settings, 'MENU_HIDE_EMPTY', False)
    if (hide_empty and (len(self.children) == 0)):
        self.visible = False
        return
    curitem = None
    for item in self.children:
        item.selected = False
        if item.match_url(request):
            if ((curitem is None) or (len(curitem.url) < len(item.url))):
                curitem = item
    if (curitem is not None):
        curitem.selected = True

dataset/ETHPy150Open borgstrom/django-simple-menu/menu/menu.py MenuItem.process/VarMisuse@14/44 `self`->`children`