@register.inclusion_tag("admin/includes/dropdown_menu.html",
                        takes_context=True)
def admin_dropdown_menu(context):
    """
    Renders the app list for the admin dropdown menu navigation.
    """
    user = context["request"].user
    template_vars = {}
    if user.is_staff:
        template_vars["dropdown_menu_app_list"] = admin_app_list(
            context["request"])
        if user.is_superuser:
            sites = Site.objects.all()
        else:
            try:
                sites = user.sitepermissions.sites.all()
            except __HOLE__:
                sites = Site.objects.none()
        template_vars["dropdown_menu_sites"] = list(sites)
        template_vars["dropdown_menu_selected_site_id"] = current_site_id()
        template_vars["settings"] = context["settings"]
        template_vars["request"] = context["request"]
        return template_vars
dataset/ETHPy150Open stephenmcd/mezzanine/mezzanine/core/templatetags/mezzanine_tags.py/admin_dropdown_menu