steambird/boecie/views.py
def form_valid(self, form: Form) -> HttpResponseRedirect:
        """
        If the form is valid, save to the associated model. Sets the hidden-field
        to a valid id before saving.

        :param form: form object
        :return: HttpResponRedirect defined by get_success_url
        """

        form.instance.study = Study.objects.get(pk=self.kwargs['pk'])
        form.save()
        return super(StudyDetailView, self).form_valid(form)

        If the form is valid, save to the associated model. Sets the hidden-field
        to a valid id before saving.

        :param form: form object
        :return: HttpResponRedirect defined by get_success_url
        
If the form is valid, save to the associated model. Sets the hidden-field
to a valid id before saving.
If the form is valid save to the associated model . Sets the hidden - field to a valid id before saving .
def form_valid(self, form: Form) -> HttpResponseRedirect:
        form.instance.study = Study.objects.get(pk=self.kwargs['pk'])
        form.save()
        return super(StudyDetailView, self).form_valid(form)
def form_valid ( self , form : Form ) -> HttpResponseRedirect : form . instance . study = Study . objects . get ( pk = self . kwargs [ 'pk' ] ) form . save ( ) return super ( StudyDetailView , self ) . form_valid ( form )
If the form is valid, save to the associated model.
If the form is valid save to the associated model .
"""
        If the form is valid, save to the associated model. Sets the hidden-field
        to a valid id before saving.

        :param form: form object
        :return: HttpResponRedirect defined by get_success_url
        """
HttpResponRedirect defined by get_success_url
HttpResponRedirect defined by get_success_url
self
form
Form
None