title: Django curl request
body: <p>Im trying to use curl to hit an endpoint in my Django application and havent been successful returning my data. </p>
  
  <pre><code>curl 127.0.0.1:8000/myapp/?email=myname@gmail.com&amp;part=123434
  </code></pre>
  
  <p>my server shows a 301 when the curl goes through, however; none of the print statements are ran in my view, and i am not able to get the querystring parameters using request.GET.get().</p>
  
  <pre><code>[21/Aug/2018 00:26:59] "GET /myapp/?email=myname@gmail.com HTTP/1.1" 301 0
  </code></pre>
  
  <p>view.py</p>
  
  <pre><code>def index(request):
      if request.method == 'GET':
          print('hello world')
          email = request.GET.get('email')
          part = request.POST.get('part')
          print(email)
          print(part)
          df = generate_dataframe('apps/myapp/data.csv')
          df = get_dataframe_by_part(part, df)
          bool = check_all(email, df)
          response_data = {}
          response_data['DoesUserExist'] = bool
          return HttpResponse(json.dumps(response_data), content_type="application/json")
  </code></pre>
  
  <p>urls.py</p>
  
  <pre><code>urlpatterns = patterns('',
                        url(r'myapp/', include('myapp.urls')),
                        )
  </code></pre>
  
  <p>myapp/urls.py</p>
  
  <pre><code>urlpatterns = patterns('',
                         url(r'^$', 'myapp.views.index', name='index'),
                         )
  </code></pre>