6fe13959a3
With a valid URL, a past donor can upgrade to a supporter by donating the rest of the amount. Django validates the data and, if it passes, puts it in the form. The JavaScript does most of the work from there.
9 lines
335 B
Python
9 lines
335 B
Python
import conservancy
|
|
|
|
def index(request):
|
|
partial_amount = conservancy.param_if_valid(request.GET, 'upgrade', 'upgrade_id', 0)
|
|
context = {
|
|
'partial_amount': partial_amount,
|
|
'minimum_amount': 120 - partial_amount,
|
|
}
|
|
return conservancy.render_template_with_context(request, "supporter/index.html", context)
|