Re: Please how do connect a modelform to a CreateView

2016-09-20 Thread James Schneider
On Sep 20, 2016 5:16 PM, "Netesy Emmanuel" wrote: > > My View.py > > class EducationCreate(CreateView): > model = Education > form_class = EducationForm > This is the linkage, so it looks like you already have it in place. Is there a specific issue you are having? > def form_valid(se

Please how do connect a modelform to a CreateView

2016-09-20 Thread Netesy Emmanuel
My View.py class EducationCreate(CreateView): model = Education form_class = EducationForm def form_valid(self, form): form.instance.student = self.request.user return super(EducationCreate, self).form_valid(form) @method_decorator(login_required) def dispatch