From: Diane Trout Date: Tue, 24 May 2016 22:37:14 +0000 (-0700) Subject: Django 1.9? replaced request.REQUEST with .GET X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=4629d51b88a6e66675f827919bdf8e9425f5fbb2 Django 1.9? replaced request.REQUEST with .GET update our code so we access the new variable name --- diff --git a/experiments/views.py b/experiments/views.py index 73e16be..c71077d 100644 --- a/experiments/views.py +++ b/experiments/views.py @@ -53,13 +53,13 @@ def startedEmail(request, pk): """ fc = get_object_or_404(FlowCell, id=pk) - send = request.REQUEST.get('send',False) + send = request.GET.get('send',False) if send in ('1', 'on', 'True', 'true', True): send = True else: send = False - bcc_managers = request.REQUEST.get('bcc', False) + bcc_managers = request.GET.get('bcc', False) if bcc_managers in ('on', '1', 'True', 'true'): bcc_managers = True else: diff --git a/htsworkflow/auth.py b/htsworkflow/auth.py index 1d781e1..dfbcd27 100644 --- a/htsworkflow/auth.py +++ b/htsworkflow/auth.py @@ -8,12 +8,12 @@ apidata = {'apiid': u'0', 'apikey': settings.DEFAULT_API_KEY} def require_api_key(request): # make sure we have the api component - if not ('apiid' in request.REQUEST or 'apikey' in request.REQUEST): + if not ('apiid' in request.GET or 'apikey' in request.GET): raise PermissionDenied # make sure the id and key are right - if request.REQUEST['apiid'] == apidata['apiid'] and \ - request.REQUEST['apikey'] == apidata['apikey']: + if request.GET['apiid'] == apidata['apiid'] and \ + request.GET['apikey'] == apidata['apikey']: return True else: raise PermissionDenied