title: Getting csrfmiddleware token in url
body: <p>I am getting csrf token in the url after submitting my form like this.</p>
  
  <p><a href="http://127.0.0.1:8000/detail/?csrfmiddlewaretoken=lqvoeSG32IcodLTFksWEU1NPQ9XCmHybwmzMKEuPzxDN1e73B0JORpAGOcGGxsjH&amp;symbol=FLWS" rel="nofollow noreferrer">http://127.0.0.1:8000/detail/?csrfmiddlewaretoken=lqvoeSG32IcodLTFksWEU1NPQ9XCmHybwmzMKEuPzxDN1e73B0JORpAGOcGGxsjH&amp;symbol=FLWS</a></p>
  
  <p>After making a GET request to view, the url is showing the csrf token in the url.</p>
  
  <p>/views.py</p>
  
  <pre><code>def search(request):
      if(request.method=='GET'):
          form=searchform(request.GET)
          if(form.is_valid()):
              id=request.GET['symbol']
              data=company.objects.filter(Symbol=id)
              form=searchform()
              return render(request, 'list-company.html',{"data":data,"form":form})
  </code></pre>
  
  <p>/urls.py</p>
  
  <pre><code>from django.contrib import admin
  from django.urls import path
  from csv2db.views import Company,search
  urlpatterns = [
      path('admin/', admin.site.urls),
      path('company/',Company,name='company-details'),
      path('detail/',search,name='search')
  
  ]
  </code></pre>
  
  <p>form in HTML file</p>
  
  <pre><code>{% block content %}
          &lt;form method="get" action="{% url 'search'  %}"&gt;
              {% csrf_token %}
              {{ form.as_ul}}
              &lt;button type="Submit"&gt;Submit&lt;/button&gt;
          &lt;/form&gt;
  </code></pre>