@login_required
def contact_list(request, pk):
    '\n    Displays a list of :model:`rr.Contact` linked to\n    :model:`rr.ServiceProvider`.\n\n    Includes a ModelForm for adding :model:`rr.Contact` to\n    :model:`rr.ServiceProvider`.\n\n    **Context**\n\n    ``object_list``\n        List of :model:`rr.Contact`.\n\n    ``form``\n        ModelForm for creating a :model:`rr.Contact`\n\n    ``object``\n        An instance of :model:`rr.ServiceProvider`.\n\n    **Template:**\n\n    :template:`rr/contact.html`\n    '
    sp = get_service_provider(pk, request.user)
    form = ContactForm(sp=sp)
    if (request.method == 'POST'):
        if ('add_contact' in request.POST):
            form = _add_contact(request, sp)
        elif ('remove_contact' in request.POST):
            _remove_contacts(request, sp)
    contacts = Contact.objects.filter(sp=sp, end_at=None)
    return render(request, 'rr/contact.html', {'object_list': contacts, 'form': form, 'object': sp})
Displays a list of :model:`rr.Contact` linked to
:model:`rr.ServiceProvider`.

Includes a ModelForm for adding :model:`rr.Contact` to
:model:`rr.ServiceProvider`.

**Context**

``object_list``
    List of :model:`rr.Contact`.

``form``
    ModelForm for creating a :model:`rr.Contact`

``object``
    An instance of :model:`rr.ServiceProvider`.

**Template:**

:template:`rr/contact.html`
@login_required
def contact_list(request, pk):
    '\n    Displays a list of :model:`rr.Contact` linked to\n    :model:`rr.ServiceProvider`.\n\n    Includes a ModelForm for adding :model:`rr.Contact` to\n    :model:`rr.ServiceProvider`.\n\n    **Context**\n\n    ``object_list``\n        List of :model:`rr.Contact`.\n\n    ``form``\n        ModelForm for creating a :model:`rr.Contact`\n\n    ``object``\n        An instance of :model:`rr.ServiceProvider`.\n\n    **Template:**\n\n    :template:`rr/contact.html`\n    '
    sp = get_service_provider(pk, request.user)
    form = ContactForm(sp=sp)
    if (request.method == 'POST'):
        if ('add_contact' in request.POST):
            form = _add_contact(request, sp)
        elif ('remove_contact' in request.POST):
            _remove_contacts(request, sp)
    contacts = Contact.objects.filter(sp=sp, end_at=None)
    return render(request, 'rr/contact.html', {'object_list': contacts, 'form': form, 'object': sp})