For crispy form on Django, I keep getting VariableDoesNotExist at /
Failed lookup for key [form] in u\'[{\\\'False\\\': False, \\\'None\\\': None,.....<
I came across the VariableDoesNotExist
problem as well with Failed lookup for key [form]
, but for me the problem was that I mistakenly used generic.DetailView
as base class instead of generic.UpdateView
.
Changing to UpdateView
fixed the problem.
class MyUpdateView(generic.UpdateView):
template_name = "object_update.html"
model = MyModel
form_class = MyCreateForm