title: django-'NoneType' object is not callable
body: <p>I got this error, when redirecting to the result page. Is that because in the redirected page, the "POST.get" function cannot get what the user has entered in the form before redirecting?</p>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>class InputFormView(FormView):
      template_name = 'inputform.html'
      form_class = InputForm
  
      def get_success_url(self):
          return ''.join(
          [
              reverse('result'),
              '?company=',self.request.POST.get('company'),
              '&amp;region=',self.request.POST.get('region')  &lt;is there anything wrong here---？       
          ]
          )
  
  
  class ReulstView(FormView):
      context_object_name = 'result_list'
      template_name = 'result_list.html'
      model = Result
  
      if form.is_valid():
          company = form.cleaned_data['company']
          region = form.cleaned_data['region']
  
          self.queryset=Result.objects.filter(region=region)
  
          return render(request, 'result_list.html', {'form': form})
  
      def get_context_data(self, **kwargs):
          context = super(ReulstView, self).get_context_data(**kwargs)
          context["sales"] = self.get_queryset().aggregate(Sum('sales'))
  
          context["company"] = self.request.POST.get("company")
          context["region"] = self.request.POST.get("region")
  
          return context
  
      def get_queryset(self):
          return Result.objects.all()
  </code></pre>
  
  <p><strong>Traceback:</strong></p>
  
  <pre><code>File "C:\Python27\lib\site-packages\django-1.8.3-py2.7.egg\django\core\handlers\base.py" in get_response
    132.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "C:\Python27\lib\site-packages\django-1.8.3-py2.7.egg\django\views\generic\base.py" in view
    71.             return self.dispatch(request, *args, **kwargs)
  File "C:\Python27\lib\site-packages\django-1.8.3-py2.7.egg\django\views\generic\base.py" in dispatch
    89.         return handler(request, *args, **kwargs)
  File "C:\Python27\lib\site-packages\django-1.8.3-py2.7.egg\django\views\generic\edit.py" in get
    205.         form = self.get_form()
  File "C:\Python27\lib\site-packages\django-1.8.3-py2.7.egg\django\views\generic\edit.py" in get_form
    74.         return form_class(**self.get_form_kwargs())
  
  Exception Type: TypeError at /result_list/
  Exception Value: 'NoneType' object is not callable
  </code></pre>
  
  <p><strong>Inputform</strong></p>
  
  <pre><code>class InputForm(forms.ModelForm):
      company=forms.CharField(widget=forms.TextInput, label="Company",error_messages={'required': 'Please enter the company name'},required=True)
  
      #region   This form can display correctly with drop down list
      iquery = Dupont.objects.values_list('region', flat=True).distinct()
      iquery_choices = [('', 'None')] + [(region,region)  for region in iquery]
      region = forms.ChoiceField(choices=iquery_choices)
  </code></pre>
  
  <p>For the same function, I tried another code, even though without error but cannot display the form data, it displays as none. Hope you can answer my question in the following link:</p>
  
  <p><a href="https://stackoverflow.com/questions/33302186/django-why-after-redirecting-the-form-display-none">django- why after redirecting, the form display &quot;None&quot;</a></p>