Django Rest Framework, passing parameters with GET request, classed based views : <p>I would like a user to send a GET request to my Django REST API:</p>

<pre><code>127.0.0.1:8000/model/?radius=5&amp;longitude=50&amp;latitude=55.1214
</code></pre>

<p>with his longitude/latitude and radius, passed in parameters, and get the queryset using GeoDjango. </p>

<p>For example, currently I have:</p>

<pre><code>class ModelViewSet(viewsets.ModelViewSet):
    queryset = Model.objects.all()
</code></pre>

<p>And what I ideally want is:</p>

<pre><code>class ModelViewSet(viewsets.ModelViewSet):
     radius = request.data['radius']
     location = Point(request.data['longitude'],request.data['latitude']
     # filter results by distance using geodjango
     queryset = Model.objects.filer(location__distance_lte=(location, D(m=distance))).distance(location).order_by('distance')
</code></pre>

<p>Now a couple of immediate errors:</p>

<p>1) <code>request</code> is not defined - should I use api_view, i.e. the function based view for this?</p>

<p>2) <a href="http://www.django-rest-framework.org/tutorial/2-requests-and-responses/" rel="noreferrer">DRF page</a> says that request.data is for POST, PUT and PATCH methods only. How can send parameters with GET?</p>
