def collection_offer_(request): form = request.web_input(submitid="", username="") form.otherid = profile.resolve(None, None, form.username) form.submitid = int(form.submitid) if not form.otherid: raise WeasylError("userRecordMissing") if request.userid == form.otherid: raise WeasylError("cannotSelfCollect") collection.offer(request.userid, form.submitid, form.otherid) return Response(define.errorpage( request.userid, "**Success!** Your collection offer has been sent " "and the recipient may now add this submission to their gallery.", [["Go Back", "/submission/%i" % (form.submitid,)], ["Return to the Home Page", "/index"]]))
def offer(self): collection.offer(self.creator, self.s, self.collector)