Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to save a from with createvue django

def form_valid(self, form):
        form.instance = form.save(commit=False)
        form.instance.created_by = self.request.user
        form.instance.save()
        return super().form_valid(form)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #save #createvue #django
ADD COMMENT
Topic
Name
9+8 =