from forms import MyContactForm
from django.views.generic.edit import FormView
class MyFormView(FormView):
template_name = 'my_forms.html'
form_class = MyContactForm
success_url = '/thanks/'
In my template, the form is called like this:
{{ form }}
But how can I call it as follows:
{{ my_contact_form }}?
These would be equivalent forms object_context_name(for models).
source
share