Hi, please I am finding it difficult to pass a display form in my templates from views.py please any help would be highly appreciated

Question:

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

def registerView(request):
if request.method == 'POST':
   ...
else:
    form = UserRegisterForm()
    p_reg_form = ProfileRegisterForm()
context = {
    'form': form,
    'p_reg_form': p_reg_form
}
return render(request, 'stackusers/register.html', context)
Asked By: Destiny Franks

||

Answers:

To fix this in your template.html

<p>{{ form.as_p }}</p
<p>{{ p_reg_form }}</p
Answered By: Destiny Franks
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.