[Answer]-Django is_valid() throws database error

1👍

class Application_form(forms.ModelForm):
    def __init__(self,*args, **kwargs):

        super(Application_form,self).__init__(*args, **kwargs)
        self.queryset = Application.objects.using('database2')

    class Meta:
        model = Application  

Link to documentation

Leave a comment