@register.simple_tag(takes_context=True)
def domains_for_user(context, request, selected_domain=None):

    domain_list = _get_domain_list(request.couch_user)
    ctxt = {
        'domain_list': domain_list,
        'current_domain': selected_domain,
        'can_publish_to_exchange': (
            selected_domain is not None and selected_domain != 'public'
            and request.couch_user and request.couch_user.can_edit_apps() and
                (request.couch_user.is_member_of(selected_domain)
                 or request.couch_user.is_superuser)
        ),
    }
    return mark_safe(render_to_string('style/includes/domain_list_dropdown.html', ctxt))
Pitch in degrees
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/hqwebapp/templatetags/hq_shared_tags.py/domains_for_user--crossover with--dataset/ETHPy150Open SpockBotMC/SpockBot/spockbot/vector.py/YawPitch.pitch