'Update or delete this catalog.'

def post(self, request, catalog_id):

    client = self.get_catalog_api_client(request.user)
    if (request.POST.get('delete-catalog') == 'on'):
        client.catalogs(catalog_id).delete()
        return redirect(reverse('api_admin:catalog-search'))
    form = CatalogForm(request.POST)
    if (not form.is_valid()):
        response = client.catalogs(catalog_id).get()
        catalog = Catalog(attributes=response)
        return render_to_response(self.template_name, self.get_context_data(catalog, form, client), status=400)
    catalog = client.catalogs(catalog_id).patch(form.instance.attributes)
    return redirect(reverse('api_admin:catalog-edit', kwargs={'catalog_id': catalog['id']}))
