Exemple #1
0
def renew_submission(token):
    token = SubmissionToken.query.filter(SubmissionToken.key == token).first()
    if not token:
        return redirect('/submit')
    # See if token has submitted
    if not token.listing:
        return redirect('/submission/%s' % token.key)
    if token.listing.expired:
        helpers.renew_listing(token.listing)
    return redirect('/submission/%s' % token.key)
def renew(listing_id):
    listing = Listing.query.get(listing_id)
    if listing:
        helpers.renew_listing(listing)
    return redirect(url_for('.admin'))