For GET requests in Django (in general), you don't need to specify the parameters in the url pattern. In your urls.py
, you simply write:
url(r'^getResource$', 'app.views.view_function')
If your request url is (as in your example):
http://example.com/getResource?userid=<userid>&resourceid=<resourceid>
You just get the values in the view function as follows:
userid = request.GET['userid']
resourceid = request.GET['resourceid']
If you're asking specifically about the django-rest-framework
app, the docs (http://www.django-rest-framework.org/tutorial/quickstart) say your urls.py
should be:
urlpatterns = patterns('',
url(r'^', include(router.urls)),
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
)