title: How to get request.environ values in python?
body: <p>When using </p>
  
  <pre><code>request.environ['QUERY_STRING']
  </code></pre>
  
  <p>I am getting value <code>ugq_no=2</code>, but how can I get value as <strong>2</strong> ?</p>
  
  <p>Reference Code :</p>
  
  <pre><code>def get_ugall_record(request):           
      qry_obj = db.Query(user_guide).order('ugq_no')             
      all_list = []    
      for q in qry_obj: 
          all_list.append(q)  
      return HttpResponse(serializers.serialize('json', all_list), mimetype='application/json')
  
  def get_faqall_record(request):        
      qry_obj = db.Query(faqs).order('faq_no')             
      all_list = []    
      for q in qry_obj: 
          all_list.append(q)  
      return HttpResponse(serializers.serialize('json', all_list), mimetype='application/json')
  </code></pre>
  
  <p>I want to make these two functions in one function.</p>
  
  <p>So I am trying with :</p>
  
  <pre><code>def get_ugall_record(request): 
      logging.debug('----1-----')
      logging.debug(request.GET.get('ugq_no'))
      if request.GET.get('ugq_no') != 'None':
          logging.debug('----2-----')
          ug_qry_obj = db.Query(user_guide).order('ugq_no')             
          ug_all_list = []    
          for q in ug_qry_obj: 
              ug_all_list.append(q)  
          return HttpResponse(serializers.serialize('json', ug_all_list), mimetype='application/json')
      elif request.GET.get('faq_no') != 'None':  
          logging.debug('----3-----')
          qry_obj = db.Query(faqs).order('faq_no')             
          all_list = []    
          for q in qry_obj: 
              all_list.append(q)  
          return HttpResponse(serializers.serialize('json', all_list), mimetype='application/json')
  </code></pre>
  
  <p>But this is not going in elif request.GET.get('faq_no') != 'None'
  What can be done?</p>