title: 405 error after implementing new search view
body: <p>Currently using Django 2.1,Python 3.6, PostgreSQL 11, and hosting the DB on Heroku.</p>
  
  <p>I am creating a web application that acts as a GUI database entry. I recently was provided with some search code here <a href="https://stackoverflow.com/questions/54315986/django-front-end-search">Django Front End Search</a>. This code worked with a test application that has the server hosted on my machine. I am now seeing a 405 error when I try to communicate with my Heroku hosted database. </p>
  
  <p>Currently my web app lists donors on donor_list.html. I would like for my user's query results to be posted on the donor_list.html after they perform their query. </p>
  
  <p>Here is the error:</p>
  
  <p>Method Not Allowed (POST): /device/donor_list/</p>
  
  <p>Method Not Allowed: /device/donor_list/</p>
  
  <p>"POST /device/donor_list/ HTTP/1.1" 405 0</p>
  
  <pre><code># Associated urls
      path('donor_list/',views.DonorList.as_view(),name='donor_list'),
      path('donor_list/',views.SearchDonor,name='donor_search'),
  
  # Donor Model
      class Donor(models.Model):
      name=models.CharField(max_length=265,blank=False)
      email=models.EmailField(max_length=265,blank=False)
      donation_house=models.ForeignKey(DonationHouse,
                                       default='1',
                                       related_name='dono_house',
                                       on_delete=models.CASCADE)
  
      def __str__(self):
          return self.name
  
  # Donor View
      class DonorList(ListView):
      context_object_name = 'donors'
      model=models.Donor
  
  # Search Code
      def SearchDonor(request):
  
      keywords=''
  
      if request.method=='POST': # form was submitted
  
          keywords = request.POST.get("ds", "")
          all_queries = None
          search_fields = ('name','email','donation_house__title')
          for keyword in keywords.split(' '):
              keyword_query = None
              for field in search_fields:
                  each_query = Q(**{field + '__icontains': keyword})
                  if not keyword_query:
                      keyword_query = each_query
                  else:
                      keyword_query = keyword_query | each_query
                      if not all_queries:
                          all_queries = keyword_query
                      else:
                          all_queries = all_queries &amp; keyword_query
  
          donorsearches = Donor.objects.filter(all_queries).distinct()
          context = {'donorsearches':donorsearches}
          return render(request, 'device_app/donor_list.html', context)
  
      else: # no data submitted
  
          context = {}
          return render(request, 'device_app/index.html', context)
  
  # donor_list.html
  
      {% extends 'device_app/base.html' %}
      {% block body_block %}
      &lt;div class="jumbotron"&gt;
      &lt;h1&gt;Donor List&lt;/h1&gt;
      &lt;p&gt;&lt;a class="button" href="{% url 'device_app:donor_create'%}"&gt;
      Create  Donor&lt;/a&gt;
      &lt;/p&gt;
      &lt;form method="POST" action="."&gt;
            {% csrf_token %}
      &lt;input id="search_box" type="text" name="ds"  placeholder="Search..." &gt;
      &lt;button class="button" type="submit" &gt;Submit&lt;/button&gt;
      &lt;/form&gt;
      &lt;br&gt;
        {{donorsearches}}
      &lt;br&gt;
      &lt;ul&gt;
      {% for donor in donors %}
      &lt;h6&gt;
        &lt;li&gt;
          &lt;a class="annoying" href="{{donor.id}}"&gt;{{donor.name}}&lt;/a&gt;
        &lt;/li&gt;
      &lt;/h6&gt;
      {% endfor %}
      &lt;/ul&gt;
      &lt;/div&gt;
      {% endblock %}
  </code></pre>