Hello
I have a query that filter the data.
I put the results in a table in the template
I have make a function that by clkicking on the th order the data,ex.

def filter(request):

  results = My.objects.filter(........)

  return render(request, "pro/all.html", {"all": results, })


than in the template i have :
.........
<tr>
            <td><ID</td> <td><a href="/order/column_name">Column Name</td> 
<td><a href="/order/street">street</td> 
</tr>            
etx.......


than i have the def

def order(request, column_name)
   
   here i need to have again :
   results = My.objects.filter(........).order_by(........) 
So in which way i can pass the variable results in order to apply the 
order_by

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1d61b952-a37e-42fa-98f7-10dafc7bb788%40googlegroups.com.

Reply via email to