Пример #1
0
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"]]))
Пример #2
0
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"]]))
Пример #3
0
 def offer(self):
     collection.offer(self.creator, self.s, self.collector)
Пример #4
0
 def offer(self):
     collection.offer(self.creator, self.s, self.collector)