def bitcoin_qrcode(request): """Return a QR Code for donating via Bitcoin.""" address = getattr(settings, 'DONATE_BITCOIN_ADDRESS', None) if address: raw = make_qr_code( bitcoin_donation_url(get_current_site(request).name, address)) return HttpResponse(raw.getvalue(), content_type='image/svg+xml') else: raise Http404
def about(request): """Return an about view showing contribution, licensing, contact, and other information.""" address = getattr(settings, "DONATE_BITCOIN_ADDRESS", None) context = { "bitcoin_address": address, "bitcoin_donate_url": bitcoin_donation_url( get_current_site(request).name, address ), "privacy_url": getattr(settings, "PRIVACY_URL", None), } return render(request, "boards/about.html", context=context)