title: Render Form Data to the Same Page
body: <p>The form works. The input is displayed on the rule. But the template displays a blank page. Help!</p>
  
  <p>views.py      </p>
  
  <pre><code>class StandingsView(FormView):
      form_class = SelectTeam
      template_name = 'teamsports/standings.html'
      model = Teams
      success_url = None
  
      def form_valid(self, form):
          form=SelectTeam
          data = self.request.GET.get('team_name')
          team = Teams.objects.filter(team_name__icontains=data).values()
          return render(self.request, 'teamsports/standings.html', {'team': team})
  </code></pre>
  
  <p>template.html</p>
  
  <pre><code>{% extends 'teamsports/base.html' %}
  
      {% block content %}
      &lt;h1&gt;Pick your team, chump&lt;/h1&gt;
  
  &lt;form form_name = SelectTeam action="" method="GET"&gt;
      {{ form }}
      &lt;input type="submit" value="Submit" /&gt;
      {{ form.errors }}
  &lt;/form&gt;    
  
  &lt;h1&gt; {{ team }} &lt;/h1&gt;
      {% for team in Teams %}
          &lt;h1&gt;{{ team.team_name }}&lt;/h1&gt;
      {% endfor %}
  {% endblock %}
  </code></pre>
  
  <p>UPDATE from settings.py - My base and home templates expand although I don't pass any variables.</p>
  
  <pre><code>TEMPLATES = [
  {
      'BACKEND': 'django.template.backends.django.DjangoTemplates',
      'DIRS': [
          '/home/mrsaltz/thepub/teamsports/templates/teamsports',
          ],
      'APP_DIRS': True,
      'OPTIONS': {
          'context_processors': [
              'django.template.context_processors.debug',
              'django.template.context_processors.request',
              'django.contrib.auth.context_processors.auth',
              'django.contrib.messages.context_processors.messages',
                      ],
      },
  },
  ]
  </code></pre>