title: Django get_or_create not getting data back
body: <p>i have created a FBV for Modal form (popup) i want to have the same view to handle both create and update, the reason i am using FBV is that am assigning the foreign key through queries rather that passing the id through the URL. Please note the JS script am using to call the Modal and render the form in it.</p>
  
  <pre><code>**Models.py:**
  
  class Startup ( models.Model ) :
      author = models.OneToOneField ( User , on_delete = models.CASCADE )
      startup_name = models.CharField ( 'Startup Name' , max_length = 32 , null = False , blank = False )
  
  class Startup_About ( models.Model ) :
      str_about = models.OneToOneField ( Startup , on_delete = models.CASCADE )
      about = models.TextField ( 'About Startup' , max_length = 2000 , null = False , blank = False )
      problem = models.TextField ( 'Problem/Opportunity' , max_length = 2000 , null = False , blank = False )
      business_model = models.TextField ( 'Business Monitization Model' , max_length = 2000 , null = False ,blank = False )
      offer = models.TextField ( 'Offer to Investors' , max_length = 2000 , null = False , blank = False )
  
      def __str__(self) :
          return str(self.str_about)
  
  **forms.py:**
  
  class startupform(forms.ModelForm):
      class Meta:
          model = Startup
          fields = ('startup_name',)
          widgets = {
              'startup_name': forms.TextInput(attrs = {'class':'form-control'}),
          }
  
      def clean(self):
          super ( ).clean ( )
          startup_name = self.cleaned_data.get ( 'startup_name' )
          startup_qs = Startup.objects.filter ( startup_name = startup_name )
          if startup_qs.exists ( ):
              raise forms.ValidationError ( 'This Startup Already Exist!' )
  
  class startupaboutform(forms.ModelForm):
      class Meta:
          model = Startup_About
          fields = ('about','problem','business_model','offer',)
          widgets = {
              'about' : forms.Textarea ( attrs = { 'class' : 'form-control' } ) ,
              'problem' : forms.Textarea ( attrs = { 'class' : 'form-control' } ) ,
              'business_model' : forms.Textarea ( attrs = { 'class' : 'form-control' } ) ,
              'offer' : forms.Textarea ( attrs = { 'class' : 'form-control' } ) ,
          }
  
  **Views.py:**
  
  @login_required
  @str_required
  def create_startupform(request):
      q = Startup.objects.filter(author=request.user)
      if q.exists():
          return redirect ( 'appwizard')
      else:
          form = startupform ( request.POST or None )
          if form.is_valid ( ) :
              instance = form.save (commit = False)
              instance.author = request.user
              instance.save()
              return redirect ( 'appwizard', pk = instance.pk )
          else:
              form = startupform()
          return render ( request , 'str_name.html' , { 'form' : form } )
  
  decorators = [str_required, login_required]
  
  @method_decorator(login_required, name='dispatch')
  @method_decorator(str_required, name='dispatch')
  class aboutview(FormView):
      template_name = 'create_about.html'
      form_class = startupaboutform
  
  @login_required
  @str_required
  def create_startupaboutform(request) :
      q = Startup.objects.filter ( author = request.user )[0]
      R = get_object_or_404(Startup, startup_name=q)
      if request.method == 'POST':
          form = startupaboutform ( request.POST )
          stup = Startup_About.objects.get_or_create(str_about=R )[0]
          if form.is_valid ( ) :
              instance = form.save ( commit = False )
              instance.str_about = R
              instance.save ( )
              return redirect('/appwizard/')
          else :
              form = startupaboutform ()
          return render ( request , 'create_about.html' , { 'form' : form } )
  
  **urls.py:**
  
  urlpatterns = [
  
      path ( 'appwizard/' , views.applicationwizard , name = 'appwizard' ) ,
      path('create_startupaboutform/', views.create_startupaboutform, name='create_startupaboutform'),
      path ( 'aboutview/' , views.aboutview.as_view() , name = 'aboutview' ) ,
  
  ]
  
  **Template - appwizard:**
  
  {% load static %}
  &lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="viewport"
            content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="ie=edge"&gt;
      &lt;title&gt;Document&lt;/title&gt;
      &lt;link rel="stylesheet" href="{% static 'assets/bootstrap/css/bootstrap.min.css' %}"&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
  
  &lt;a href="#"  id="btn" class="btn btn-info btn-lg"&gt;Open Modal&lt;/a&gt;
  
  
  {% include "create_about.html" %}
  
  
  &lt;script src="{% static 'assets/js/jquery.min.js' %}"&gt;&lt;/script&gt;
      &lt;script src="{% static 'assets/bootstrap/js/bootstrap.min.js' %}"&gt;&lt;/script&gt;
  
  &lt;script&gt;
       $(document).ready(function(){
               $("#btn").on("click", function(){
                   $("#form").load("{% url 'aboutview' %}", function(){
                   $("#about").modal("show");
               });
               });
       });
  &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  
  **Template - creaye_about - form in a Modal:**
  
  &lt;form id="form" method="post" action="{% url 'create_startupaboutform' %}"&gt;
      {% csrf_token %}
  &lt;div class="modal fade" id="about" role="dialog" tabindex="-1"&gt;
      &lt;div class="modal-dialog" role="document"&gt;
          &lt;div class="modal-content"&gt;
              &lt;div class="modal-header"&gt;
                  &lt;h4 class="modal-title"&gt;Modal Title&lt;/h4&gt;
                  &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span
                          aria-hidden="true"&gt;×&lt;/span&gt;&lt;/button&gt;
              &lt;/div&gt;
              &lt;div class="modal-body"&gt;
                  {{form}}
              &lt;/div&gt;
              &lt;div class="modal-footer"&gt;
                  &lt;button class="btn btn-light" type="button" data-dismiss="modal"&gt;Close&lt;/button&gt;
                  &lt;button class="btn btn-primary" type="submit"&gt;Save&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  ```
  </code></pre>