def current_placements(request):
    current = None
    placements = Placement.objects.none()
    sections = retrieve_all_sections()
    for section in sections:
        pattern = re.compile(section.pattern)
        if pattern.search(request.path):
            current = section
            break
    if current:
        placements = retrieve_section_placements(current)
    return {SECTION_CONTEXT_KEY: current, PLACEMENTS_CONTEXT_KEY: placements}
Find the common prefix directory of all files in a zipfile.
dataset/ETHPy150Open mlavin/django-ad-code/adcode/context_processors.py/current_placements--crossover with--dataset/ETHPy150Open cloudmatrix/esky/esky/util.py/zipfile_common_prefix_dir