def post(request, title): #Hacer que el contributor prinmero sea el de sesion contrib = get_contributor_by_username( "tttt" #request.user.username ) album = add_album_with_contributor(title, contrib) response = redirect(reverse("resource_album", args=[album.slug, ])) response['Cache-Control'] = 'no-cache' return response
def get(request, username): if username is not None: contrib = get_contributor_by_username(username) response = HttpResponse( content=contrib.json, content_type="application/json", ) else: contribs = [x.json for x in get_contributors()] response = render_to_response( "data/list.json", {"data": contribs}, content_type="application/json", ) response['Cache-Control'] = 'no-cache' return response