title: How to display InLine objects in Django Admin Interface
body: <p>This is my current Admin Interface:<a href="https://i.stack.imgur.com/Hvolc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hvolc.png" alt="Admin Interface"></a></p>
  
  <p>A user inputs text through a form &amp; model called "UserText". I have written a function using NLP to extract only the questions from the UserText. I would like each of these individual questions to be displayed in each "User question" section of the Admin Interface. As of now, I cannot get that to work. </p>
  
  <p>Here is my current code:</p>
  
  <p>Models.py</p>
  
  <pre><code>class UserText(models.Model):
      user_input = models.TextField()
  
  class Question(models.Model):
      user_text = models.ForeignKey(
          UserText,
          on_delete=models.CASCADE,
          blank=True,
          null=True,
      )
      user_questions = models.CharField(max_length=2000)
  </code></pre>
  
  <p>Views.py</p>
  
  <pre><code>def user_text_view(request):
      form = forms.UserTextForm()
      if request.method == 'POST':
          form = forms.UserTextForm(request.POST)
          if form.is_valid():
              UserText = models.UserText
              Question = models.Question
              user_input = request.POST.get('user_input', '')
              user_input_obj = UserText(user_input = user_input)
              user_questions_obj = Question(user_text = user_input_obj,
                  user_questions = Question_Init(user_input_obj))
              user_input_obj.save()
              user_questions_obj.save()
              print("Thanks for the questions!")
  
      else:
          form = forms.UserTextForm()
  
      return render(request, 'text_input_form.html', {'form': form})
  </code></pre>
  
  <p>Admin.py</p>
  
  <pre><code>class QuestionInLine(admin.StackedInline):
      model = Question
      display = ('user_questions_obj')
  
  
  @admin.register(UserText)
  class UserTextAdmin(admin.ModelAdmin):
      model = UserText
      display = ('user_input')
      inlines = [
          QuestionInLine,
  
      ]
  </code></pre>
  
  <p>And finally my function:</p>
  
  <pre><code>def Question_Init(user_input_obj):
  
      Beginning_Question_Prompts = ("Who","Whom","What","Where","When","Why","Which",
      "Whose","How","Was","Were","Did","Do","Does","Is")
      Ending_Question_Prompts = ("?",":","...")
      questions = []
  
      text1 = user_input_obj.user_input
  
      textList = sent_tokenize(text1)
  
      for sentence in textList:
          if sentence.startswith(Beginning_Question_Prompts):
             questions.append(sentence)
  
          if sentence.endswith(Ending_Question_Prompts):
              questions.append(sentence)
  
      return questions
  </code></pre>
  
  <p>I know this is a lot, sorry, but I do not know how to get each question to populate the question fields in my Admin Interface. Thanks</p>