debtinfo/views.py
def post(self, request, *args, **kwargs):
        """Validate form data and save to database, return response else return form."""
        self.object = None
        self.form = self.get_form(self.form_class)

        if self.form.is_valid():
            obj = self.form.save(commit=False)
            self.object = obj.save()

            messages.success(request, 'Query successful! ')
            return HttpResponseRedirect(reverse_lazy('debtinfo:search_debtors'))

        return self.get(request, *args, **kwargs)
Validate form data and save to database, return response else return form.
Validate form data and save to database, return response else return form.
Validate form data and save to database return response else return form .
def post(self, request, *args, **kwargs):
        self.object = None
        self.form = self.get_form(self.form_class)
        if self.form.is_valid():
            obj = self.form.save(commit=False)
            self.object = obj.save()
            messages.success(request, 'Query successful! ')
            return HttpResponseRedirect(reverse_lazy('debtinfo:search_debtors'))
        return self.get(request, *args, **kwargs)
def post ( self , request , * args , ** kwargs ) : self . object = None self . form = self . get_form ( self . form_class ) if self . form . is_valid ( ) : obj = self . form . save ( commit = False ) self . object = obj . save ( ) messages . success ( request , 'Query successful! ' ) return HttpResponseRedirect ( reverse_lazy ( 'debtinfo:search_debtors' ) ) return self . get ( request , * args , ** kwargs )
Validate form data and save to database, return response else return form.
Validate form data and save to database return response else return form .
"""Validate form data and save to database, return response else return form."""
self
request