'Create a new catalog for a user.'

def post(self, request, username):

    form = CatalogForm(request.POST)
    client = self.get_catalog_api_client(request.user)
    if (not form.is_valid()):
        return render_to_response(self.template, self.get_context_data(client, username, form), status=400)
    attrs = form.instance.attributes
    catalog = client.catalogs.post(attrs)
    return redirect(reverse('api_admin:catalog-edit', kwargs={'catalog_id': catalog['id']}))
