title: Django request GET parameter value list
body: <p>I want to do some sorting and what I have mind is doing a GET request with a parameter named ordering like this and the value will be the model atttribute that I will use to sort like this:</p>
  
  <pre><code>?order=['-age', 'height']
  </code></pre>
  
  <p>the problem is when I try to receive the order parameter.. The value is a list.</p>
  
  <p>I tried using the ast like this:</p>
  
  <pre><code>if 'order' in request.GET:
          import ast
          order = ast.literal_eval(request.GET.get('order'))
          queryset = queryset.order_by(*order)
  </code></pre>
  
  <p>It worked. However, I would like to avoid using the ast library, is there any other way around? </p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I did my parameter like this:</p>
  
  <p>?order=-age,height</p>
  
  <p>And just used split in python like this:</p>
  
  <pre><code>if 'order' in request.GET:
      order = request.GET.get('order').split(',')
      queryset = queryset.order_by(*order)
  </code></pre>