1👍
✅
def form_valid(self, form):
# self.object will contain the object that the view is operating upon.
self.object = form.save(commit=False)
self.object.session_id = self.request.session['s_id']
self.object.save()
Source:stackexchange.com