title: Django: How to provide context for a FormView?
body: <p>Newbie Question: I have a FormView which displays a sign-up form, using Django's validations, etc. It all works fine, however, I can't seem to work out how to provide any data (context) to the template. Currently, I have:</p>
  
  <pre><code>from django.shortcuts import render
  from django.shortcuts import redirect
  from django.http import HttpResponse
  from accounts.forms import SignUpForm
  
  class SignUpView(FormView):
      template_name = 'accounts/signup.html'
      form_class = SignUpForm 
  
      def form_valid(self, form):
          # executes when form validates..
          (...)
          return redirect('/account/')
  </code></pre>
  
  <p>I tried adding some context data via <code>get()</code> per below, which I need when the page first displays, which sort of works <em>except</em> the input fields of the form are gone (the labels are all there):</p>
  
  <pre><code>def get(self, request):
      return render(self.request, self.template_name, {'data': data })
  </code></pre>
  
  <p>Could someone please clarify why that is, and how to get it to work? To put it another way: When using FormView with form_valid(), where do I place code intended for the initial GET request? </p>