form.valid() code example
Example: form valid
def form_valid(self, form):
form.instance.user = self.request.user
super(Your_View, self).form_valid(form)
return redirect('home')
def form_valid(self, form):
form.instance.user = self.request.user
super(Your_View, self).form_valid(form)
return redirect('home')