pending_requests_bootstrap. Route handler or application helper. This docstring was expanded to make future maintenance easier. Returns: Varies.
()
| 16682 | selected_has_bounty = True |
| 16683 | elif selected: |
| 16684 | selected_reason_value = (selected.get("bounty_reason") or "")[:333] |
| 16685 | |
| 16686 | return render_template( |
| 16687 | "bounty.html", |
| 16688 | title=_("Bounty"), |
| 16689 | q=q, |
| 16690 | selected_id=selected_id, |
| 16691 | selected=Obj(selected) if selected else None, |
| 16692 | selected_bounty_value=selected_bounty_value, |
| 16693 | selected_reason_value=selected_reason_value, |
| 16694 | selected_has_bounty=selected_has_bounty, |
| 16695 | entries=[Obj(e) for e in entries], |
| 16696 | ) |
| 16697 | |
| 16698 | @app.route("/bounty/set", methods=["POST"]) |
| 16699 | @login_required |
| 16700 | def bounty_set(): |
| 16701 | """Add or edit a bounty price on an existing profiler entry (admin only).""" |
| 16702 | require_admin() |
| 16703 | eid = request.form.get("eid", type=int) |
| 16704 | price_raw = (request.form.get("price") or "").strip() |
| 16705 | reason = (request.form.get("reason") or "").strip() |
| 16706 | if not eid: |
| 16707 | flash(_("Select a profile first.")) |