code: def chrome_setup_view(request):
      
      logger.debug(request.POST)
      token = None
      if request.method == "POST":
          if "token" in request.POST:
              token = request.POST.get("token")
  
      if not token:
          return HttpResponse('{"error":"Invalid data."}', content_type="text/json")
      ncfg, _ = NotificationConfig.objects.get_or_create(user=request.user)
      ncfg.gcm_token = token
      ncfg.save()
      return HttpResponse('{"success":"Now registered."}', content_type="text/json")
docs: Set up a browser-side GCM session.
      This *requires* a valid login session. A "token" POST parameter is saved under the "gcm_token"
      parameter in the logged in user's NotificationConfig.