Module Import alias Import alias Import alias ImportFrom alias ImportFrom alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body Assign NameStore NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore Dict Assign NameStore Dict Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body If CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad ListLoad Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Return Assign NameStore AttributeLoad NameLoad attr If NameLoad body Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body If Call AttributeLoad NameLoad attr Str body Continue Assign NameStore BinOpMod Str NameLoad TryExcept body Expr Call NameLoad NameLoad keyword ListLoad Str handlers ExceptHandler type NameLoad body Pass Assign AttributeStore NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body If UnaryOpNot SubscriptLoad AttributeLoad NameLoad attr Index NameLoad body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr keyword Lambda arguments args NameParam defaults AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore Dict For NameStore AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad If CompareNotIn NameLoad AttributeLoad NameLoad attr body Return ListLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad If Call AttributeLoad NameLoad attr NameLoad body If BoolOpOr CompareIs NameLoad NameLoad CompareLt Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr body Assign NameStore NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign NameStore ListComp NameLoad comprehension NameStore NameLoad AttributeLoad NameLoad attr If Call NameLoad NameLoad Str NameLoad body FunctionDef arguments args NameParam defaults body For NameStore AttributeLoad NameLoad attr body If BoolOpOr AttributeLoad NameLoad attr Call NameLoad NameLoad body Return NameLoad decorator_list For NameStore NameLoad body If Call NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults ListLoad Num NameLoad NameLoad NameLoad NameLoad kwarg body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad For NameStore NameLoad body Expr Call NameLoad NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Return If Call NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body If CompareGt AttributeLoad NameLoad attr TupleLoad Num Num body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr Call NameLoad Call NameLoad AttributeLoad NameLoad attr If Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call NameLoad AttributeLoad NameLoad attr For NameStore NameLoad body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListComp NameLoad comprehension NameStore NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Lambda arguments args NameParam defaults AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Str NameLoad If BoolOpAnd NameLoad CompareEq Call NameLoad AttributeLoad NameLoad attr Num body Assign AttributeStore NameLoad attr NameLoad Return Assign NameStore NameLoad For NameStore AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad If Call AttributeLoad NameLoad attr NameLoad body If BoolOpOr CompareIs NameLoad NameLoad CompareLt Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr body Assign NameStore NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore NameLoad If AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore NameLoad orelse If Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore NameLoad Return NameLoad decorator_list decorator_list
N/A N/A copy N/A re N/A sys django.conf settings django.utils.text slugify N/A N/A django.apps apps N/A N/A N/A ImportError N/A N/A apps False Menu N/A object N/A N/A 
    Menu is a class that generates menus

    It allows for multiple named menus, which can be accessed in your templates
    using the generate_menu template tag.

    Menus are loaded from the INSTALLED_APPS, inside a file named menus.py.
    This file should import the Menu & MenuItem classes and then call add_item:

        Menu.add_item("main", MenuItem("My item",
                                       reverse("myapp.views.myview"),
                                       weight=10))

    Note: You cannot have the same URL in a MenuItem in different
    Menus, but it is not enforced. If you do submenus will not work
    properly.
     N/A items N/A N/A sorted N/A N/A loaded False add_item N/A N/A c name item N/A N/A N/A 
        add_item adds MenuItems to the menu identified by 'name'
         N/A N/A isinstance item MenuItem N/A N/A N/A name N/A c items N/A N/A N/A N/A c items N/A name N/A N/A N/A N/A N/A N/A c items N/A name append item N/A N/A N/A c sorted N/A name False N/A classmethod load_menus N/A N/A c N/A N/A N/A 
        load_menus loops through INSTALLED_APPS and loads the menu.py
        files from them.
         N/A N/A c loaded N/A N/A N/A app_names N/A settings INSTALLED_APPS N/A apps N/A N/A app_names N/A N/A app_config name N/A app_config N/A N/A apps get_app_configs N/A app app_names N/A N/A N/A N/A app startswith django. N/A N/A N/A menu_module N/A %s.menus app N/A N/A N/A N/A __import__ menu_module fromlist N/A menu N/A N/A N/A ImportError N/A N/A N/A N/A c loaded True N/A classmethod sort_menus N/A N/A c N/A N/A N/A 
        sort_menus goes through the items and sorts them based on
        their weight
         N/A name N/A c items N/A N/A N/A N/A N/A c sorted N/A name N/A N/A N/A N/A N/A N/A c items N/A name sort key N/A N/A N/A x N/A N/A x weight N/A N/A N/A c sorted N/A name True N/A classmethod process N/A N/A c request name N/A None N/A N/A 
        process uses the current request to determine which menus
        should be visible, which are selected, etc.
         N/A N/A N/A c load_menus N/A N/A N/A c sort_menus N/A N/A name None N/A N/A items N/A N/A name N/A c items N/A N/A N/A items N/A name N/A N/A c process request name N/A items N/A N/A name N/A c items N/A N/A N/A N/A items N/A N/A copy deepcopy N/A N/A c items N/A name N/A curitem None N/A item items N/A N/A N/A N/A item process request N/A N/A item visible N/A N/A N/A item selected False N/A N/A N/A item match_url request N/A N/A N/A N/A curitem None N/A N/A len N/A curitem url N/A len N/A item url N/A N/A curitem item N/A N/A curitem None N/A N/A N/A curitem selected True N/A visible N/A item N/A item items N/A item visible N/A N/A getattr settings MENU_SELECT_PARENTS False N/A is_child_selected N/A N/A item N/A N/A N/A child N/A item children N/A N/A N/A N/A child selected N/A is_child_selected child N/A N/A True N/A N/A item visible N/A N/A N/A is_child_selected item N/A N/A N/A item selected True N/A visible N/A classmethod N/A MenuItem N/A object N/A N/A 
    MenuItem represents an item in a menu, possibly one that has a sub-menu (children).
     __init__ N/A N/A self title url children weight check visible slug exact_url N/A N/A 1 None True None False kwargs N/A N/A 
        MenuItem constructor

        title       either a string or a callable to be used for the title
        url         the url of the item
        children    an array of MenuItems that are sub menus to this item
                    this can also be a callable that generates an array
        weight      used to sort adjacent MenuItems
        check       a callable to determine if this item is visible
        slug        used to generate id's in the HTML, auto generated from
                    the title if left as None
        exact_url   normally we check if the url matches the request prefix
                    this requires an exact match if set

        All other keyword arguments passed into the MenuItem constructor are
        assigned to the MenuItem object as attributes so that they may be used
        in your templates. This allows you to attach arbitrary data and use it
        in which ever way suits your menus the best.
         N/A N/A self url url N/A N/A self title title N/A N/A self visible visible N/A N/A self children children N/A N/A self weight weight N/A N/A self check_func check N/A N/A self slug slug N/A N/A self exact_url exact_url N/A N/A self selected False N/A N/A self parent None N/A k kwargs N/A N/A N/A setattr self k N/A kwargs N/A k N/A check N/A N/A self request N/A N/A N/A 
        Evaluate if we should be visible for this request
         N/A N/A callable N/A self check_func N/A N/A N/A self visible N/A N/A self check_func request N/A process N/A N/A self request N/A N/A N/A 
        process determines if this item should visible, if its selected, etc...
         N/A N/A N/A self check request N/A N/A N/A self visible N/A N/A N/A N/A callable N/A self title N/A N/A N/A self title N/A N/A self title request N/A N/A N/A self slug None N/A N/A N/A N/A sys version_info N/A 3 0 N/A N/A N/A self slug N/A slugify N/A self title N/A N/A N/A self slug N/A slugify N/A unicode N/A self title N/A N/A callable N/A self children N/A N/A children N/A list N/A N/A self children request N/A N/A children N/A list N/A self children N/A child children N/A N/A N/A child parent self N/A N/A N/A child process request N/A N/A self children N/A child N/A child children N/A child visible N/A N/A N/A N/A self children sort key N/A N/A N/A child N/A N/A child weight N/A hide_empty N/A getattr settings MENU_HIDE_EMPTY False N/A N/A hide_empty N/A N/A len N/A self children 0 N/A N/A N/A self visible False N/A N/A curitem None N/A item N/A self children N/A N/A N/A item selected False N/A N/A N/A item match_url request N/A N/A N/A N/A curitem None N/A N/A len N/A curitem url N/A len N/A item url N/A N/A curitem item N/A N/A curitem None N/A N/A N/A curitem selected True N/A match_url N/A N/A self request N/A N/A N/A 
        match url determines if this is selected
         N/A matched False N/A N/A self exact_url N/A N/A N/A N/A re match N/A %s$ N/A N/A self url N/A request path N/A N/A matched True N/A N/A N/A N/A re match N/A %s N/A self url N/A request path N/A N/A matched True N/A matched N/A N/A