我坚持尝试做这个我没有看到太多的情况,我在下面的代码中尝试做的是显示注册表单,一旦用户提交他/她将获得recaptcha表单。
我想知道如何在用户提交recaptcha表单后从第一个表单(注册表单)传递变量。有没有办法解决这个问题?下面是我的代码
from django.shortcuts import render_to_response
from django.template.context import RequestContext
from forms import Registration_Form, reCaptcha_Form
def register(request):
return render_to_response( 'core/accounts/register.html',
{
'form' : Registration_Form(),
},
context_instance=RequestContext(request)
)
def process_registration_form(request):
if request.method == 'POST':
registration_form = Registration_Form(request.POST)
return render_to_response( 'core/accounts/recaptcha.html',
{
'form' : reCaptcha_Form(),
},
context_instance=RequestContext(request)
)