i have included :
from django.http import HttpResponseRedirect
def form_valid(self,form):
obj= form.save(commit= False)
obj.question= self.get_object()
obj.user= self.request.user
obj.save()
return HttpResponseRedirect(’/’)
i have included :
from django.http import HttpResponseRedirect
def form_valid(self,form):
obj= form.save(commit= False)
obj.question= self.get_object()
obj.user= self.request.user
obj.save()
return HttpResponseRedirect(’/’)