I'm having a hard time setting the context object names for django's generic class based views.
class FictiveCreateView(generic.CreateView):
context_object_name = 'fictive_form'
form_class = forms.FictiveForm
template_name = 'fictive/create_fictive.html'
def get_context_data(self, **kwargs):
context = super(generic.CreateView, self).get_context_data(**kwargs)
print context
I thought setting context_object_name = 'fictive_form'
would change the name of the context object.
Turns out it just gives an empty object :
{'fictive_form': None, 'form': <fictive.forms.FictiveForm object at 0x7f925807a9d0>, u'view': <fictive.views.FictiveCreateView object at 0x7f925807aa50>}
What am i missing here ?