1👍
✅
You are using the variable form
in your template, but you are passing UserRegisterForm
and ContactForm
as template context.
Try something like:
<form...>
{{ UserRegisterForm }}
{% for form in ContactForm %}
{{ form }}
{% endfor %}
</form>
Two hints:
- check out formsets for handling multiple forms of the same type
- please make sure your code is correctly indented, especially with Python
0👍
You’ve sent two variables to your template, with the keys UserRegisterForm
and ContactForm
. You have to use those names in your template, not just form
.
- How to retrieve amazon s3 temporary credentials?
- What is the "proper" way to use django REST framework?
- Django Assigning ID from Count: Avoiding Race Condition
- Git- local master branch appears to be broken
- Django too many open files
Source:stackexchange.com