Hi,
I'm trying to create a simple crispy form by following this simple example:
https://gist.github.com/maraujop/1838193
My form.py:
class ContactForm(forms.Form):
fullname = forms.CharField(label ="Full Name",required=True)
email = forms.EmailField(label ="Your Email Address",required=True)
subject = forms.CharField(label ="Subject",required=True)
message = forms.CharField(widget=forms.Textarea)
My view.py
def formview(request):
return render(request, 'index.html', {'form': ContactForm()})
and in my template index.html:
{% load crispy_forms_tags %}
{% crispy form %}
Still I get the error:
VariableDoesNotExist at / Failed lookup for key [form] in "[{'False': False, ........
What am I missing? Please help