def post(self, recipe_key): recipe = Recipe.get(recipe_key) if users.is_current_user_admin() and recipe != None: sticky = Sticky() sticky.recipe = recipe sticky.text = self.request.get('text') sticky.put() self.response.headers['Content-Type'] = 'text/javascript' self.response.out.write(simplejson.dumps(sticky.to_dict()))