I have been trying to fix this error for days now and to no avail, i really need help on how to pass in the context to my templates Views.py
JavaScript
x
12
12
1
def registerView(request):
2
if request.method == 'POST':
3
4
else:
5
form = UserRegisterForm()
6
p_reg_form = ProfileRegisterForm()
7
context = {
8
'form': form,
9
'p_reg_form': p_reg_form
10
}
11
return render(request, 'stackusers/register.html', context)
12
Advertisement
Answer
To fix this in your template.html
JavaScript
1
3
1
<p>{{ form.as_p }}</p
2
<p>{{ p_reg_form }}</p
3